From 2ce0f40b7976abb210f2b0fa408dbdf69ccbb952 Mon Sep 17 00:00:00 2001 From: Yong-Dian Jian Date: Wed, 13 Oct 2010 22:41:48 +0000 Subject: [PATCH] fix for cityslam --- nonlinear/Ordering.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/nonlinear/Ordering.h b/nonlinear/Ordering.h index 753af5e71..7fb97496d 100644 --- a/nonlinear/Ordering.h +++ b/nonlinear/Ordering.h @@ -9,10 +9,13 @@ #include + + #include #include #include +#include #include #include #include @@ -35,6 +38,10 @@ public: typedef Map::const_iterator const_iterator; Ordering() : nVars_(0) {} + Ordering(const std::list & L):nVars_(0) { + int i = 0; + BOOST_FOREACH( const Symbol& s, L) insert(s, i++) ; + } /** One greater than the maximum ordering index. */ Index nVars() const { return nVars_; }