VectorMap uses a straightforward stl::map of Vectors. It has O(log n)
insert and access, and is fairly fast at both. However, it has high overhead
for arithmetic operations such as +, scale, axpy etc...
VectorBTree uses a functional BTree as a way to access SubVectors
in an ordinary Vector. Inserting is O(n) and much slower, but accessing,
is O(log n) and might be a bit slower than VectorMap. Arithmetic operations
are blindingly fast, however. The cost is it is not as KISS as VectorMap.
Access to vectors is now exclusively via operator[]
Vector access in VectorMap is via a Vector reference
Vector access in VectorBtree is via the SubVector type (see Vector.h)
Feb 16 2010: FD: I made VectorMap the default, because I decided to try
and speed up conjugate gradients by using Sparse FactorGraphs all the way.
fixed a nasty bug and change the internal data type of subgraph preconditioner from reference to boost shared pointer. reference is not a good idea for class members, because no type checking will happen
This is a big edit but with no templates involed, so it should not be a big deal.
New namespace gtsam::noiseModel collects all noise models, which provide efficient whitening and chain-rule implementation needed for optimization. The class hierarchy gives us the ability to use models from full covariances to i.i.d. unit variance noise with a single interface, where the latter will be much cheaper.
From now on, all non-linear factors take a shared_ptr to a Gaussian noise model. This is done through the parameter (const sharedGaussian& model). The use of a shared pointer allows us to share one noise models for thousands of factors, if applicable.
Just like Richard's Symbol change, there is a compile flag GTSAM_MAGIC_GAUSSIAN which allows you to use doubles, vectors, or matrices to created noise models on the fly. You have to set it to the correct dimension. Use of this is *not* encouraged and the flag will disappear after some good soul fixed all unit tests.