changed functions begin, end and get_names to const

release/4.3a0
Manohar Paluri 2009-08-28 15:38:27 +00:00
parent e2a05b37d8
commit fe8870a5f0
1 changed files with 5 additions and 5 deletions

View File

@ -33,9 +33,9 @@ namespace gtsam {
virtual ~FGConfig() {};
/** return all the nodes in the graph **/
std::vector<std::string> get_names() {
std::vector<std::string> get_names() const {
std::vector<std::string> names;
for(iterator it=values.begin(); it!=values.end(); it++)
for(const_iterator it=values.begin(); it!=values.end(); it++)
names.push_back(it->first);
return names;
}
@ -52,8 +52,8 @@ namespace gtsam {
virtual void operator+=(const FGConfig & delta);
virtual FGConfig operator+(const FGConfig & delta) const;
iterator begin() {return values.begin();}
iterator end() {return values.end();}
const_iterator begin() {return values.begin();}
const_iterator end() {return values.end();}
/** get a vector in the configuration by name */
Vector get(const std::string& name) const;