Public Types | List of all members
gtsam::SymbolicBayesNet Class Reference

#include <SymbolicBayesNet.h>

Inheritance diagram for gtsam::SymbolicBayesNet:
Inheritance graph
[legend]

Public Types

typedef BayesNet< SymbolicConditionalBase
 
typedef SymbolicConditional ConditionalType
 
typedef std::shared_ptr< Thisshared_ptr
 
typedef std::shared_ptr< ConditionalTypesharedConditional
 
typedef SymbolicBayesNet This
 
- Public Types inherited from gtsam::BayesNet< SymbolicConditional >
typedef std::shared_ptr< SymbolicConditionalsharedConditional
 A shared pointer to a conditional. More...
 
- Public Types inherited from gtsam::FactorGraph< SymbolicConditional >
typedef FastVector< sharedFactor >::const_iterator const_iterator
 
typedef SymbolicConditional FactorType
 factor type More...
 
typedef FastVector< sharedFactor >::iterator iterator
 
typedef std::shared_ptr< SymbolicConditionalsharedFactor
 Shared pointer to a factor. More...
 
typedef sharedFactor value_type
 

Public Member Functions

Standard Constructors
 SymbolicBayesNet ()
 
template<typename ITERATOR >
 SymbolicBayesNet (ITERATOR firstConditional, ITERATOR lastConditional)
 
template<class CONTAINER >
 SymbolicBayesNet (const CONTAINER &conditionals)
 
template<class DERIVEDCONDITIONAL >
 SymbolicBayesNet (const FactorGraph< DERIVEDCONDITIONAL > &graph)
 
 SymbolicBayesNet (std::initializer_list< std::shared_ptr< SymbolicConditional >> conditionals)
 
 SymbolicBayesNet (SymbolicConditional &&c)
 Construct from a single conditional. More...
 
SymbolicBayesNetoperator() (SymbolicConditional &&c)
 Add a single conditional and return a reference. This allows for chaining, e.g., SymbolicBayesNet bn = SymbolicBayesNet(SymbolicConditional(...))(SymbolicConditional(...));. More...
 
Testable
GTSAM_EXPORT bool equals (const This &bn, double tol=1e-9) const
 
GTSAM_EXPORT void print (const std::string &s="SymbolicBayesNet", const KeyFormatter &formatter=DefaultKeyFormatter) const override
 print More...
 
- Public Member Functions inherited from gtsam::BayesNet< SymbolicConditional >
void print (const std::string &s="BayesNet", const KeyFormatter &formatter=DefaultKeyFormatter) const override
 
void dot (std::ostream &os, const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DotWriter &writer=DotWriter()) const
 Output to graphviz format, stream version. More...
 
std::string dot (const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DotWriter &writer=DotWriter()) const
 Output to graphviz format string. More...
 
void saveGraph (const std::string &filename, const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DotWriter &writer=DotWriter()) const
 output to file with graphviz format. More...
 
double logProbability (const HybridValues &x) const
 
double evaluate (const HybridValues &c) const
 
- Public Member Functions inherited from gtsam::FactorGraph< SymbolicConditional >
 FactorGraph (std::initializer_list< std::shared_ptr< DERIVEDFACTOR >> sharedFactors)
 
virtual ~FactorGraph ()=default
 
void reserve (size_t size)
 
IsDerived< DERIVEDFACTOR > push_back (std::shared_ptr< DERIVEDFACTOR > factor)
 Add a factor directly using a shared_ptr. More...
 
IsDerived< DERIVEDFACTOR > push_back (const DERIVEDFACTOR &factor)
 
IsDerived< DERIVEDFACTOR > emplace_shared (Args &&... args)
 Emplace a shared pointer to factor of given type. More...
 
IsDerived< DERIVEDFACTOR > add (std::shared_ptr< DERIVEDFACTOR > factor)
 add is a synonym for push_back. More...
 
std::enable_if< std::is_base_of< FactorType, DERIVEDFACTOR >::value, This >::typeoperator+= (std::shared_ptr< DERIVEDFACTOR > factor)
 Append factor to factor graph. More...
 
std::enable_if< std::is_base_of< FactorType, DERIVEDFACTOR >::value, This >::typeoperator, (std::shared_ptr< DERIVEDFACTOR > factor)
 Overload comma operator to allow for append chaining. More...
 
HasDerivedElementType< ITERATOR > push_back (ITERATOR firstFactor, ITERATOR lastFactor)
 
HasDerivedValueType< ITERATOR > push_back (ITERATOR firstFactor, ITERATOR lastFactor)
 Push back many factors with an iterator (factors are copied) More...
 
HasDerivedElementType< CONTAINER > push_back (const CONTAINER &container)
 
HasDerivedValueType< CONTAINER > push_back (const CONTAINER &container)
 Push back non-pointer objects in a container (factors are copied). More...
 
void add (const FACTOR_OR_CONTAINER &factorOrContainer)
 
Thisoperator+= (const FACTOR_OR_CONTAINER &factorOrContainer)
 
std::enable_if< std::is_base_of< This, typename CLIQUE::FactorGraphType >::value >::type push_back (const BayesTree< CLIQUE > &bayesTree)
 
FactorIndices add_factors (const CONTAINER &factors, bool useEmptySlots=false)
 
bool equals (const This &fg, double tol=1e-9) const
 Check equality up to tolerance. More...
 
size_t size () const
 
bool empty () const
 
const sharedFactor at (size_t i) const
 
sharedFactorat (size_t i)
 
std::shared_ptr< F > at (size_t i)
 
const std::shared_ptr< F > at (size_t i) const
 Const version of templated at method. More...
 
const sharedFactor operator[] (size_t i) const
 
sharedFactoroperator[] (size_t i)
 
const_iterator begin () const
 
const_iterator end () const
 
sharedFactor front () const
 
sharedFactor back () const
 
double error (const HybridValues &values) const
 
iterator begin ()
 
iterator end ()
 
virtual void resize (size_t size)
 
void remove (size_t i)
 
void replace (size_t index, sharedFactor factor)
 
iterator erase (iterator item)
 
iterator erase (iterator first, iterator last)
 
void dot (std::ostream &os, const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DotWriter &writer=DotWriter()) const
 Output to graphviz format, stream version. More...
 
std::string dot (const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DotWriter &writer=DotWriter()) const
 Output to graphviz format string. More...
 
void saveGraph (const std::string &filename, const KeyFormatter &keyFormatter=DefaultKeyFormatter, const DotWriter &writer=DotWriter()) const
 output to file with graphviz format. More...
 
size_t nrFactors () const
 
KeySet keys () const
 
KeyVector keyVector () const
 
bool exists (size_t idx) const
 

Additional Inherited Members

- Protected Member Functions inherited from gtsam::BayesNet< SymbolicConditional >
 BayesNet ()
 
 BayesNet (ITERATOR firstConditional, ITERATOR lastConditional)
 
 BayesNet (std::initializer_list< sharedConditional > conditionals)
 
- Protected Member Functions inherited from gtsam::FactorGraph< SymbolicConditional >
bool isEqual (const FactorGraph &other) const
 Check exact equality of the factor pointers. Useful for derived ==. More...
 
 FactorGraph ()
 
 FactorGraph (ITERATOR firstFactor, ITERATOR lastFactor)
 
 FactorGraph (const CONTAINER &factors)
 
- Protected Attributes inherited from gtsam::FactorGraph< SymbolicConditional >
FastVector< sharedFactorfactors_
 

Detailed Description

A SymbolicBayesNet is a Bayes Net of purely symbolic conditionals.

Definition at line 32 of file SymbolicBayesNet.h.

Member Typedef Documentation

◆ Base

Definition at line 34 of file SymbolicBayesNet.h.

◆ ConditionalType

Definition at line 36 of file SymbolicBayesNet.h.

◆ shared_ptr

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

Definition at line 37 of file SymbolicBayesNet.h.

◆ sharedConditional

Definition at line 38 of file SymbolicBayesNet.h.

◆ This

Definition at line 35 of file SymbolicBayesNet.h.

Constructor & Destructor Documentation

◆ SymbolicBayesNet() [1/6]

gtsam::SymbolicBayesNet::SymbolicBayesNet ( )
inline

Construct empty factor graph

Definition at line 44 of file SymbolicBayesNet.h.

◆ SymbolicBayesNet() [2/6]

template<typename ITERATOR >
gtsam::SymbolicBayesNet::SymbolicBayesNet ( ITERATOR  firstConditional,
ITERATOR  lastConditional 
)
inline

Construct from iterator over conditionals

Definition at line 48 of file SymbolicBayesNet.h.

◆ SymbolicBayesNet() [3/6]

template<class CONTAINER >
gtsam::SymbolicBayesNet::SymbolicBayesNet ( const CONTAINER &  conditionals)
inlineexplicit

Construct from container of factors (shared_ptr or plain objects)

Definition at line 53 of file SymbolicBayesNet.h.

◆ SymbolicBayesNet() [4/6]

template<class DERIVEDCONDITIONAL >
gtsam::SymbolicBayesNet::SymbolicBayesNet ( const FactorGraph< DERIVEDCONDITIONAL > &  graph)
inlineexplicit

Implicit copy/downcast constructor to override explicit template container constructor

Definition at line 60 of file SymbolicBayesNet.h.

◆ SymbolicBayesNet() [5/6]

gtsam::SymbolicBayesNet::SymbolicBayesNet ( std::initializer_list< std::shared_ptr< SymbolicConditional >>  conditionals)
inline

Constructor that takes an initializer list of shared pointers. SymbolicBayesNet bn = {make_shared<SymbolicConditional>(), ...};

Definition at line 67 of file SymbolicBayesNet.h.

◆ SymbolicBayesNet() [6/6]

gtsam::SymbolicBayesNet::SymbolicBayesNet ( SymbolicConditional &&  c)
inline

Construct from a single conditional.

Definition at line 71 of file SymbolicBayesNet.h.

Member Function Documentation

◆ equals()

bool gtsam::SymbolicBayesNet::equals ( const This bn,
double  tol = 1e-9 
) const

Check equality

Definition at line 28 of file SymbolicBayesNet.cpp.

◆ operator()()

SymbolicBayesNet& gtsam::SymbolicBayesNet::operator() ( SymbolicConditional &&  c)
inline

Add a single conditional and return a reference. This allows for chaining, e.g., SymbolicBayesNet bn = SymbolicBayesNet(SymbolicConditional(...))(SymbolicConditional(...));.

Definition at line 81 of file SymbolicBayesNet.h.

◆ print()

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

print

Reimplemented from gtsam::FactorGraph< SymbolicConditional >.

Definition at line 95 of file SymbolicBayesNet.h.


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


gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:16:31