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

#include <HybridFactorGraph.h>

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

Public Types

using Base = FactorGraph< Factor >
 
using Indices = KeyVector
 
using shared_ptr = std::shared_ptr< This >
 shared_ptr to This More...
 
using This = HybridFactorGraph
 this class More...
 
using Values = gtsam::Values
 backwards compatibility More...
 
- Public Types inherited from gtsam::FactorGraph< Factor >
typedef FastVector< sharedFactor >::const_iterator const_iterator
 
typedef Factor FactorType
 factor type More...
 
typedef FastVector< sharedFactor >::iterator iterator
 
typedef std::shared_ptr< FactorsharedFactor
 Shared pointer to a factor. More...
 
typedef sharedFactor value_type
 

Public Member Functions

Constructors

map from keys to values

 HybridFactorGraph ()=default
 Default constructor. More...
 
template<class DERIVEDFACTOR >
 HybridFactorGraph (const FactorGraph< DERIVEDFACTOR > &graph)
 
Extra methods to inspect discrete/continuous keys.
std::set< DiscreteKeydiscreteKeys () const
 Get all the discrete keys in the factor graph. More...
 
KeySet discreteKeySet () const
 Get all the discrete keys in the factor graph, as a set. More...
 
std::unordered_map< Key, DiscreteKeydiscreteKeyMap () const
 Get a map from Key to corresponding DiscreteKey. More...
 
const KeySet continuousKeySet () const
 Get all the continuous keys in the factor graph. More...
 
- Public Member Functions inherited from gtsam::FactorGraph< Factor >
 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...
 
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)
 
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)
 
virtual void print (const std::string &s="FactorGraph", const KeyFormatter &formatter=DefaultKeyFormatter) const
 Print out graph to std::cout, with optional key formatter. More...
 
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)
 
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::FactorGraph< Factor >
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< Factor >
FastVector< sharedFactorfactors_
 

Detailed Description

Hybrid Factor Graph Factor graph with utilities for hybrid factors.

Definition at line 38 of file HybridFactorGraph.h.

Member Typedef Documentation

◆ Base

Definition at line 40 of file HybridFactorGraph.h.

◆ Indices

Definition at line 45 of file HybridFactorGraph.h.

◆ shared_ptr

using gtsam::HybridFactorGraph::shared_ptr = std::shared_ptr<This>

shared_ptr to This

Definition at line 42 of file HybridFactorGraph.h.

◆ This

this class

Definition at line 41 of file HybridFactorGraph.h.

◆ Values

backwards compatibility

Definition at line 44 of file HybridFactorGraph.h.

Constructor & Destructor Documentation

◆ HybridFactorGraph() [1/2]

gtsam::HybridFactorGraph::HybridFactorGraph ( )
default

Default constructor.

◆ HybridFactorGraph() [2/2]

template<class DERIVEDFACTOR >
gtsam::HybridFactorGraph::HybridFactorGraph ( const FactorGraph< DERIVEDFACTOR > &  graph)
inline

Implicit copy/downcast constructor to override explicit template container constructor. In BayesTree this is used for: cachedSeparatorMarginal_.reset(*separatorMarginal)

Definition at line 60 of file HybridFactorGraph.h.

Member Function Documentation

◆ continuousKeySet()

const KeySet gtsam::HybridFactorGraph::continuousKeySet ( ) const

Get all the continuous keys in the factor graph.

Definition at line 63 of file HybridFactorGraph.cpp.

◆ discreteKeyMap()

std::unordered_map< Key, DiscreteKey > gtsam::HybridFactorGraph::discreteKeyMap ( ) const

Get a map from Key to corresponding DiscreteKey.

Definition at line 54 of file HybridFactorGraph.cpp.

◆ discreteKeys()

std::set< DiscreteKey > gtsam::HybridFactorGraph::discreteKeys ( ) const

Get all the discrete keys in the factor graph.

Definition at line 26 of file HybridFactorGraph.cpp.

◆ discreteKeySet()

KeySet gtsam::HybridFactorGraph::discreteKeySet ( ) const

Get all the discrete keys in the factor graph, as a set.

Definition at line 44 of file HybridFactorGraph.cpp.


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


gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:46:20