#include <VariableSlots.h>
Public Types | |
typedef FastMap< Key, FastVector< size_t > > | Base |
Public Types inherited from gtsam::FastMap< Key, FastVector< size_t > > | |
typedef std::map< Key, FastVector< size_t >, std::less< Key >, typename internal::FastDefaultAllocator< std::pair< const Key, FastVector< size_t > > >::type > | Base |
Static Public Attributes | |
static const GTSAM_EXPORT size_t | Empty = numeric_limits<size_t>::max() |
Standard Constructors | |
template<class FG > | |
VariableSlots (const FG &factorGraph) | |
Testable | |
GTSAM_EXPORT void | print (const std::string &str="VariableSlots: ") const |
GTSAM_EXPORT bool | equals (const VariableSlots &rhs, double tol=0.0) const |
Additional Inherited Members | |
Public Member Functions inherited from gtsam::FastMap< Key, FastVector< size_t > > | |
bool | exists (const Key &e) const |
FastMap () | |
FastMap (const Base &x) | |
FastMap (const FastMap< Key, FastVector< size_t > > &x) | |
FastMap (INPUTITERATOR first, INPUTITERATOR last) | |
bool | insert2 (const Key &key, const FastVector< size_t > &val) |
operator std::map< Key, FastVector< size_t > > () const | |
A combined factor is assembled as one block of rows for each component factor. In each row-block (factor), some of the column-blocks (variables) may be empty since factors involving different sets of variables are interleaved.
VariableSlots describes the 2D block structure of the combined factor. It is a map<Key, vector<size_t> >. The Key is the real variable index of the combined factor slot. The vector<size_t> tells, for each row-block (factor), which column-block (variable slot) from the component factor appears in this block of the combined factor.
As an example, if the combined factor contains variables 1, 3, and 5, then "variableSlots[3][2] == 0" indicates that column-block 1 (corresponding to variable index 3), row-block 2 (also meaning component factor 2), comes from column-block 0 of component factor 2.
Definition at line 51 of file VariableSlots.h.
typedef FastMap<Key, FastVector<size_t> > gtsam::VariableSlots::Base |
Definition at line 55 of file VariableSlots.h.
gtsam::VariableSlots::VariableSlots | ( | const FG & | factorGraph | ) |
Constructor from a set of factors to be combined. Sorts the variables and keeps track of which variable from each factor ends up in each slot of the combined factor, as described in the class comment.
Definition at line 88 of file VariableSlots.h.
bool gtsam::VariableSlots::equals | ( | const VariableSlots & | rhs, |
double | tol = 0.0 |
||
) | const |
equals
Definition at line 53 of file VariableSlots.cpp.
void gtsam::VariableSlots::print | ( | const std::string & | str = "VariableSlots: " | ) | const |
Definition at line 30 of file VariableSlots.cpp.
Definition at line 56 of file VariableSlots.h.