From 8ca71f833d1972af605b8d1684e449538758ef26 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Mon, 26 Nov 2012 19:21:07 +0000 Subject: [PATCH] Fix in VectorValues::hasSameStructure --- gtsam/linear/VectorValues.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gtsam/linear/VectorValues.cpp b/gtsam/linear/VectorValues.cpp index 219f2e5f5..efe642d93 100644 --- a/gtsam/linear/VectorValues.cpp +++ b/gtsam/linear/VectorValues.cpp @@ -148,7 +148,8 @@ bool VectorValues::hasSameStructure(const VectorValues& other) const { if(this->size() != other.size()) return false; for(size_t j=0; jdim(j) != other.dim(j)) + // Directly accessing maps instead of using VV::dim in case some values are empty + if(this->maps_[j].rows() != other.maps_[j].rows()) return false; return true; }