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

#include <SymbolicFactor.h>

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

Public Types

typedef SymbolicFactor This
 
typedef Factor Base
 
typedef SymbolicConditional ConditionalType
 
typedef std::shared_ptr< Thisshared_ptr
 
typedef KeyVector::iterator iterator
 Iterator over keys.
 
typedef KeyVector::const_iterator const_iterator
 Const iterator over keys.
 

Protected Attributes

KeyVector keys_
 The keys involved in this factor.
 

Standard Constructors

template<typename ITERATOR >
static Factor FromIterators (ITERATOR first, ITERATOR last)
 

Standard Interface

bool empty () const
 Whether the factor is empty (involves zero variables).
 
Key front () const
 First key.
 
Key back () const
 Last key.
 
const_iterator find (Key key) const
 find
 
const KeyVectorkeys () const
 Access the factor's involved variable keys.
 
const_iterator begin () const
 
const_iterator end () const
 
size_t size () const
 

Advanced Interface

KeyVectorkeys ()
 
iterator begin ()
 
iterator end ()
 

Standard Constructors

 SymbolicFactor ()
 
 SymbolicFactor (Key j)
 
 SymbolicFactor (Key j1, Key j2)
 
 SymbolicFactor (Key j1, Key j2, Key j3)
 
 SymbolicFactor (Key j1, Key j2, Key j3, Key j4)
 
 SymbolicFactor (Key j1, Key j2, Key j3, Key j4, Key j5)
 
 SymbolicFactor (Key j1, Key j2, Key j3, Key j4, Key j5, Key j6)
 
 SymbolicFactor (const Factor &factor)
 
SymbolicFactor::shared_ptr clone () const
 Copy this object as its actual derived type.
 

Testable

bool equals (const This &other, double tol=1e-9) const
 
void print (const std::string &s="SymbolicFactor", const KeyFormatter &formatter=DefaultKeyFormatter) const override
 print
 
void printKeys (const std::string &s="SymbolicFactor", const KeyFormatter &formatter=DefaultKeyFormatter) const override
 print only keys
 

Advanced Constructors

template<typename KEYITERATOR >
static SymbolicFactor FromIterators (KEYITERATOR beginKey, KEYITERATOR endKey)
 
template<typename KEYITERATOR >
static SymbolicFactor::shared_ptr FromIteratorsShared (KEYITERATOR beginKey, KEYITERATOR endKey)
 
template<class CONTAINER >
static SymbolicFactor FromKeys (const CONTAINER &keys)
 
template<class CONTAINER >
static SymbolicFactor::shared_ptr FromKeysShared (const CONTAINER &keys)
 

Standard Interface

double error (const HybridValues &c) const override
 The error method throws an exception.
 
std::pair< std::shared_ptr< SymbolicConditional >, std::shared_ptr< SymbolicFactor > > eliminate (const Ordering &keys) const
 

Detailed Description

SymbolicFactor represents a symbolic factor that specifies graph topology but is not associated with any numerical function.

for symbolic elimination etc.

Note that derived classes must also redefine the This and shared_ptr typedefs. See JacobianFactor, etc. for examples.

Member Typedef Documentation

◆ shared_ptr

typedef std::shared_ptr<This> gtsam::SymbolicFactor::shared_ptr

Overriding the shared_ptr typedef

Constructor & Destructor Documentation

◆ SymbolicFactor() [1/8]

gtsam::SymbolicFactor::SymbolicFactor ( )
inline

Default constructor for I/O

◆ SymbolicFactor() [2/8]

gtsam::SymbolicFactor::SymbolicFactor ( Key  j)
inlineexplicit

Construct unary factor

◆ SymbolicFactor() [3/8]

gtsam::SymbolicFactor::SymbolicFactor ( Key  j1,
Key  j2 
)
inline

Construct binary factor

◆ SymbolicFactor() [4/8]

gtsam::SymbolicFactor::SymbolicFactor ( Key  j1,
Key  j2,
Key  j3 
)
inline

Construct ternary factor

◆ SymbolicFactor() [5/8]

gtsam::SymbolicFactor::SymbolicFactor ( Key  j1,
Key  j2,
Key  j3,
Key  j4 
)
inline

Construct 4-way factor

◆ SymbolicFactor() [6/8]

gtsam::SymbolicFactor::SymbolicFactor ( Key  j1,
Key  j2,
Key  j3,
Key  j4,
Key  j5 
)
inline

Construct 5-way factor

◆ SymbolicFactor() [7/8]

gtsam::SymbolicFactor::SymbolicFactor ( Key  j1,
Key  j2,
Key  j3,
Key  j4,
Key  j5,
Key  j6 
)
inline

Construct 6-way factor

◆ SymbolicFactor() [8/8]

gtsam::SymbolicFactor::SymbolicFactor ( const Factor factor)
inlineexplicit

Create symbolic version of any factor

Member Function Documentation

◆ begin() [1/2]

const_iterator gtsam::Factor::begin ( ) const
inlineinherited

Iterator at beginning of involved variable keys

◆ begin() [2/2]

iterator gtsam::Factor::begin ( )
inlineinherited

Iterator at beginning of involved variable keys

◆ eliminate()

std::pair<std::shared_ptr<SymbolicConditional>, std::shared_ptr<SymbolicFactor> > gtsam::SymbolicFactor::eliminate ( const Ordering keys) const

Eliminate the variables in keys, in the order specified in keys, returning a conditional and marginal.

◆ end() [1/2]

const_iterator gtsam::Factor::end ( ) const
inlineinherited

Iterator at end of involved variable keys

◆ end() [2/2]

iterator gtsam::Factor::end ( )
inlineinherited

Iterator at end of involved variable keys

◆ FromIterators() [1/2]

template<typename KEYITERATOR >
static SymbolicFactor gtsam::SymbolicFactor::FromIterators ( KEYITERATOR  beginKey,
KEYITERATOR  endKey 
)
inlinestatic

Constructor from a collection of keys

◆ FromIterators() [2/2]

template<typename ITERATOR >
static Factor gtsam::Factor::FromIterators ( ITERATOR  first,
ITERATOR  last 
)
inlinestaticprotectedinherited

Construct factor from iterator keys. This is called internally from derived factor static factor methods, as a workaround for not being able to call the protected constructors above.

◆ FromIteratorsShared()

template<typename KEYITERATOR >
static SymbolicFactor::shared_ptr gtsam::SymbolicFactor::FromIteratorsShared ( KEYITERATOR  beginKey,
KEYITERATOR  endKey 
)
inlinestatic

Constructor from a collection of keys

◆ FromKeys()

template<class CONTAINER >
static SymbolicFactor gtsam::SymbolicFactor::FromKeys ( const CONTAINER &  keys)
inlinestatic

Constructor from a collection of keys - compatible with boost assign::list_of and boost assign::cref_list_of

◆ FromKeysShared()

template<class CONTAINER >
static SymbolicFactor::shared_ptr gtsam::SymbolicFactor::FromKeysShared ( const CONTAINER &  keys)
inlinestatic

Constructor from a collection of keys - compatible with boost assign::list_of and boost assign::cref_list_of

◆ keys()

KeyVector& gtsam::Factor::keys ( )
inlineinherited
Returns
keys involved in this factor

◆ size()

size_t gtsam::Factor::size ( ) const
inlineinherited
Returns
the number of variables involved in this factor

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