more comments

release/4.3a0
Kai Ni 2010-11-01 18:38:12 +00:00
parent 78868aa715
commit 438af1608d
4 changed files with 13 additions and 8 deletions

View File

@ -50,6 +50,9 @@ namespace gtsam {
// constructor with a list of unconnected keys // constructor with a list of unconnected keys
DSF(const std::list<KEY>& keys) : Tree() { BOOST_FOREACH(const KEY& key, keys) *this = this->add(key, key); } DSF(const std::list<KEY>& keys) : Tree() { BOOST_FOREACH(const KEY& key, keys) *this = this->add(key, key); }
// constructor with a set of unconnected keys
DSF(const std::set<KEY>& keys) : Tree() { BOOST_FOREACH(const KEY& key, keys) *this = this->add(key, key); }
// create a new singleton, does nothing if already exists // create a new singleton, does nothing if already exists
Self makeSet(const KEY& key) const { if (mem(key)) return *this; else return this->add(key, key); } Self makeSet(const KEY& key) const { if (mem(key)) return *this; else return this->add(key, key); }

View File

@ -18,7 +18,7 @@
#pragma once #pragma once
#include <map> #include <set>
#include <boost/pool/pool_alloc.hpp> #include <boost/pool/pool_alloc.hpp>
namespace gtsam { namespace gtsam {

View File

@ -93,11 +93,13 @@ public:
typedef BlockColumn<const MATRIX> constColumn; typedef BlockColumn<const MATRIX> constColumn;
protected: protected:
FullMatrix& matrix_; FullMatrix& matrix_; // the reference to the original matrix
std::vector<size_t> variableColOffsets_; std::vector<size_t> variableColOffsets_; // the starting columns of each block (0-based)
size_t rowStart_;
size_t rowEnd_; // for elimination, represent
size_t blockStart_; size_t rowStart_; // 0 initially
size_t rowEnd_; // the number of row - 1, initially
size_t blockStart_; // 0 initially
public: public:
/** Construct from an empty matrix (asserts that the matrix is empty) */ /** Construct from an empty matrix (asserts that the matrix is empty) */

View File

@ -75,8 +75,8 @@ public:
SharedDiagonal model_; // Gaussian noise model with diagonal covariance matrix SharedDiagonal model_; // Gaussian noise model with diagonal covariance matrix
std::vector<size_t> firstNonzeroBlocks_; std::vector<size_t> firstNonzeroBlocks_;
AbMatrix matrix_; AbMatrix matrix_; // the full matrix correponding to the factor
BlockAb Ab_; BlockAb Ab_; // the block view of the full matrix
public: public: