GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
Public Types | Public Member Functions | Static Public Attributes | List of all members
gtsam::VariableSlots Class Reference

#include <VariableSlots.h>

Inheritance diagram for gtsam::VariableSlots:
Inheritance graph
[legend]
Collaboration diagram for gtsam::VariableSlots:
Collaboration graph
[legend]

Public Types

typedef FastMap< Key, FastVector< size_t > > Base
 

Public Member Functions

 operator std::map< Key, FastVector< size_t > > () const
 
bool insert2 (const Key &key, const FastVector< size_t > &val)
 
bool exists (const Key &e) const
 

Static Public Attributes

static GTSAM_EXPORT const size_t Empty
 

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ VariableSlots()

template<class FG >
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.

Member Function Documentation

◆ equals()

GTSAM_EXPORT bool gtsam::VariableSlots::equals ( const VariableSlots rhs,
double  tol = 0.0 
) const

equals

◆ exists()

bool gtsam::FastMap< Key , FastVector< size_t > >::exists ( const Key e) const
inlineinherited

Handy 'exists' function

◆ insert2()

bool gtsam::FastMap< Key , FastVector< size_t > >::insert2 ( const Key key,
const FastVector< size_t > &  val 
)
inlineinherited

Handy 'insert' function for Matlab wrapper

◆ operator std::map< Key, FastVector< size_t > >()

gtsam::FastMap< Key , FastVector< size_t > >::operator std::map< Key , FastVector< size_t > > ( ) const
inlineinherited

Conversion to a standard STL container

◆ print()

GTSAM_EXPORT void gtsam::VariableSlots::print ( const std::string &  str = "VariableSlots: ") const

print


The documentation for this class was generated from the following file: