From 89ebed53cc74b7e3a291fc2dddd842a629858998 Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Wed, 3 Apr 2019 23:42:47 -0400 Subject: [PATCH] fixed comments --- gtsam/inference/VariableIndex.h | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/gtsam/inference/VariableIndex.h b/gtsam/inference/VariableIndex.h index ad8d6720b..c16946f80 100644 --- a/gtsam/inference/VariableIndex.h +++ b/gtsam/inference/VariableIndex.h @@ -63,7 +63,7 @@ public: /// @name Standard Constructors /// @{ - /** Default constructor, creates an empty VariableIndex */ + /// Default constructor, creates an empty VariableIndex VariableIndex() : nFactors_(0), nEntries_(0) {} /** @@ -77,19 +77,16 @@ public: /// @name Standard Interface /// @{ - /** - * The number of variable entries. This is one greater than the variable - * with the highest index. - */ + /// The number of variable entries. This is equal to the number of unique variable Keys. size_t size() const { return index_.size(); } - /** The number of factors in the original factor graph */ + /// The number of factors in the original factor graph size_t nFactors() const { return nFactors_; } - /** The number of nonzero blocks, i.e. the number of variable-factor entries */ + /// The number of nonzero blocks, i.e. the number of variable-factor entries size_t nEntries() const { return nEntries_; } - /** Access a list of factors by variable */ + /// Access a list of factors by variable const Factors& operator[](Key variable) const { KeyMap::const_iterator item = index_.find(variable); if(item == index_.end()) @@ -102,10 +99,10 @@ public: /// @name Testable /// @{ - /** Test for equality (for unit tests and debug assertions). */ + /// Test for equality (for unit tests and debug assertions). bool equals(const VariableIndex& other, double tol=0.0) const; - /** Print the variable index (for unit tests and debugging). */ + /// Print the variable index (for unit tests and debugging). void print(const std::string& str = "VariableIndex: ", const KeyFormatter& keyFormatter = DefaultKeyFormatter) const; @@ -140,17 +137,17 @@ public: template void remove(ITERATOR firstFactor, ITERATOR lastFactor, const FG& factors); - /** Remove unused empty variables (in debug mode verifies they are empty). */ + /// Remove unused empty variables (in debug mode verifies they are empty). template void removeUnusedVariables(ITERATOR firstKey, ITERATOR lastKey); - /** Iterator to the first variable entry */ + /// Iterator to the first variable entry const_iterator begin() const { return index_.begin(); } - /** Iterator to the first variable entry */ + /// Iterator to the first variable entry const_iterator end() const { return index_.end(); } - /** Find the iterator for the requested variable entry */ + /// Find the iterator for the requested variable entry const_iterator find(Key key) const { return index_.find(key); } protected: