From dfbb02570b3c044fbd2ae098da94fe7218e0c977 Mon Sep 17 00:00:00 2001 From: Frank Dellaert Date: Sun, 16 Sep 2012 13:40:31 +0000 Subject: [PATCH] Fixed confusing template naming --- gtsam/inference/VariableIndex.h | 34 ++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/gtsam/inference/VariableIndex.h b/gtsam/inference/VariableIndex.h index d747d1122..312906218 100644 --- a/gtsam/inference/VariableIndex.h +++ b/gtsam/inference/VariableIndex.h @@ -64,13 +64,13 @@ public: * of a factor graph. This constructor is used when the number of variables * is known beforehand. */ - template VariableIndex(const FactorGraph& factorGraph, Index nVariables); + template VariableIndex(const FG& factorGraph, Index nVariables); /** * Create a VariableIndex that computes and stores the block column structure * of a factor graph. */ - template VariableIndex(const FactorGraph& factorGraph); + template VariableIndex(const FG& factorGraph); /// @} /// @name Standard Interface @@ -116,7 +116,7 @@ public: * Augment the variable index with new factors. This can be used when * solving problems incrementally. */ - template void augment(const FactorGraph& factors); + template void augment(const FG& factors); /** * Remove entries corresponding to the specified factors. @@ -129,7 +129,7 @@ public: * @param factors The factors being removed, which must symbolically correspond * exactly to the factors with the specified \c indices that were added. */ - template void remove(const CONTAINER& indices, const FactorGraph& factors); + template void remove(const CONTAINER& indices, const FG& factors); /// Permute the variables in the VariableIndex according to the given permutation void permuteInPlace(const Permutation& permutation); @@ -154,14 +154,14 @@ protected: void checkVar(Index variable) const { assert(variable < index_.size()); } /// Internal function to populate the variable index from a factor graph - template void fill(const FactorGraph& factorGraph); + template void fill(const FG& factorGraph); /// @} }; /* ************************************************************************* */ -template -void VariableIndex::fill(const FactorGraph& factorGraph) { +template +void VariableIndex::fill(const FG& factorGraph) { // Build index mapping from variable id to factor index for(size_t fi=0; fi -VariableIndex::VariableIndex(const FactorGraph& factorGraph) : +template +VariableIndex::VariableIndex(const FG& factorGraph) : nFactors_(0), nEntries_(0) { // If the factor graph is empty, return an empty index because inside this @@ -187,7 +187,7 @@ VariableIndex::VariableIndex(const FactorGraph& factorGraph) : if(factorGraph.size() > 0) { // Find highest-numbered variable Index maxVar = 0; - BOOST_FOREACH(const typename FactorGraph::sharedFactor& factor, factorGraph) { + BOOST_FOREACH(const typename FG::sharedFactor& factor, factorGraph) { if(factor) { BOOST_FOREACH(const Index key, factor->keys()) { if(key > maxVar) @@ -204,21 +204,21 @@ VariableIndex::VariableIndex(const FactorGraph& factorGraph) : } /* ************************************************************************* */ -template -VariableIndex::VariableIndex(const FactorGraph& factorGraph, Index nVariables) : +template +VariableIndex::VariableIndex(const FG& factorGraph, Index nVariables) : index_(nVariables), nFactors_(0), nEntries_(0) { fill(factorGraph); } /* ************************************************************************* */ -template -void VariableIndex::augment(const FactorGraph& factors) { +template +void VariableIndex::augment(const FG& factors) { // If the factor graph is empty, return an empty index because inside this // if block we assume at least one factor. if(factors.size() > 0) { // Find highest-numbered variable Index maxVar = 0; - BOOST_FOREACH(const typename FactorGraph::sharedFactor& factor, factors) { + BOOST_FOREACH(const typename FG::sharedFactor& factor, factors) { if(factor) { BOOST_FOREACH(const Index key, factor->keys()) { if(key > maxVar) @@ -245,8 +245,8 @@ void VariableIndex::augment(const FactorGraph& factors) { } /* ************************************************************************* */ -template -void VariableIndex::remove(const CONTAINER& indices, const FactorGraph& factors) { +template +void VariableIndex::remove(const CONTAINER& indices, const FG& factors) { // NOTE: We intentionally do not decrement nFactors_ because the factor // indices need to remain consistent. Removing factors from a factor graph // does not shift the indices of other factors. Also, we keep nFactors_