gtsam 4.2.0
gtsam
gtsam::SymbolicFactor Class Reference

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.

+ Inheritance diagram for gtsam::SymbolicFactor:

Standard Constructors

 SymbolicFactor ()
 Default constructor for I/O.
 
 SymbolicFactor (Key j)
 Construct unary factor.
 
 SymbolicFactor (Key j1, Key j2)
 Construct binary factor.
 
 SymbolicFactor (Key j1, Key j2, Key j3)
 Construct ternary factor.
 
 SymbolicFactor (Key j1, Key j2, Key j3, Key j4)
 Construct 4-way factor.
 
 SymbolicFactor (Key j1, Key j2, Key j3, Key j4, Key j5)
 Construct 5-way factor.
 
 SymbolicFactor (Key j1, Key j2, Key j3, Key j4, Key j5, Key j6)
 Construct 6-way factor.
 
 SymbolicFactor (const Factor &factor)
 Create symbolic version of any factor.
 
virtual ~SymbolicFactor ()
 
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 More...
 
void printKeys (const std::string &s="SymbolicFactor", const KeyFormatter &formatter=DefaultKeyFormatter) const override
 print only keys More...
 

Standard Interface

double error (const HybridValues &c) const override
 The error method throws an exception. More...
 
std::pair< boost::shared_ptr< SymbolicConditional >, boost::shared_ptr< SymbolicFactor > > eliminate (const Ordering &keys) const
 Eliminate the variables in keys, in the order specified in keys, returning a conditional and marginal.
 

Advanced Constructors

template<typename KEYITERATOR >
static SymbolicFactor FromIterators (KEYITERATOR beginKey, KEYITERATOR endKey)
 Constructor from a collection of keys.
 
template<typename KEYITERATOR >
static SymbolicFactor::shared_ptr FromIteratorsShared (KEYITERATOR beginKey, KEYITERATOR endKey)
 Constructor from a collection of keys.
 
template<class CONTAINER >
static SymbolicFactor FromKeys (const CONTAINER &keys)
 Constructor from a collection of keys - compatible with boost assign::list_of and boost assign::cref_list_of.
 
template<class CONTAINER >
static SymbolicFactor::shared_ptr FromKeysShared (const CONTAINER &keys)
 Constructor from a collection of keys - compatible with boost assign::list_of and boost assign::cref_list_of.
 

Public Types

typedef SymbolicFactor This
 
typedef Factor Base
 
typedef SymbolicConditional ConditionalType
 
typedef boost::shared_ptr< Thisshared_ptr
 Overriding the shared_ptr typedef.
 
- Public Types inherited from gtsam::Factor
typedef KeyVector::iterator iterator
 Iterator over keys.
 
typedef KeyVector::const_iterator const_iterator
 Const iterator over keys.
 

Friends

class boost::serialization::access
 Serialization function.
 

Additional Inherited Members

- Public Member Functions inherited from gtsam::Factor
virtual ~Factor ()=default
 Default destructor.
 
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
 Iterator at beginning of involved variable keys.
 
const_iterator end () const
 Iterator at end of involved variable keys.
 
size_t size () const
 
bool equals (const This &other, double tol=1e-9) const
 check equality
 
KeyVectorkeys ()
 
iterator begin ()
 Iterator at beginning of involved variable keys.
 
iterator end ()
 Iterator at end of involved variable keys.
 
- Protected Member Functions inherited from gtsam::Factor
 Factor ()
 Default constructor for I/O.
 
template<typename CONTAINER >
 Factor (const CONTAINER &keys)
 Construct factor from container of keys. More...
 
template<typename ITERATOR >
 Factor (ITERATOR first, ITERATOR last)
 Construct factor from iterator keys. More...
 
- Static Protected Member Functions inherited from gtsam::Factor
template<typename CONTAINER >
static Factor FromKeys (const CONTAINER &keys)
 Construct factor from container of keys. More...
 
template<typename ITERATOR >
static Factor FromIterators (ITERATOR first, ITERATOR last)
 Construct factor from iterator keys. More...
 
- Protected Attributes inherited from gtsam::Factor
KeyVector keys_
 The keys involved in this factor.
 

Member Function Documentation

◆ error()

double gtsam::SymbolicFactor::error ( const HybridValues c) const
overridevirtual

The error method throws an exception.

Reimplemented from gtsam::Factor.

Reimplemented in gtsam::SymbolicConditional.

◆ print()

void gtsam::SymbolicFactor::print ( const std::string &  s = "SymbolicFactor",
const KeyFormatter formatter = DefaultKeyFormatter 
) const
inlineoverridevirtual

print

Reimplemented from gtsam::Factor.

◆ printKeys()

void gtsam::SymbolicFactor::printKeys ( const std::string &  s = "SymbolicFactor",
const KeyFormatter formatter = DefaultKeyFormatter 
) const
inlineoverridevirtual

print only keys

Reimplemented from gtsam::Factor.


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