fixed comments

release/4.3a0
Frank Dellaert 2019-04-03 23:42:47 -04:00
parent 3e10adb178
commit 89ebed53cc
1 changed files with 11 additions and 14 deletions

View File

@ -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<typename ITERATOR, class FG>
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<typename ITERATOR>
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: