Public Types | Protected Attributes | Private Attributes | List of all members
gtsam::HybridFactor Class Referenceabstract

#include <HybridFactor.h>

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

Public Types

typedef Factor Base
 Our base class. More...
 
enum  Category { Category::None, Category::Discrete, Category::Continuous, Category::Hybrid }
 Enum to help with categorizing hybrid factors. More...
 
typedef std::shared_ptr< HybridFactorshared_ptr
 shared_ptr to this class More...
 
typedef HybridFactor This
 This class. More...
 
- Public Types inherited from gtsam::Factor
typedef KeyVector::const_iterator const_iterator
 Const iterator over keys. More...
 
typedef KeyVector::iterator iterator
 Iterator over keys. More...
 

Public Member Functions

Standard Constructors
 HybridFactor ()=default
 
 HybridFactor (const KeyVector &keys)
 Construct hybrid factor from continuous keys. More...
 
 HybridFactor (const DiscreteKeys &discreteKeys)
 Construct hybrid factor from discrete keys. More...
 
 HybridFactor (const KeyVector &continuousKeys, const DiscreteKeys &discreteKeys)
 Construct a new Hybrid Factor object. More...
 
Testable
virtual bool equals (const HybridFactor &lf, double tol=1e-9) const
 equals More...
 
void print (const std::string &s="HybridFactor\n", const KeyFormatter &formatter=DefaultKeyFormatter) const override
 print More...
 
Standard Interface
bool isDiscrete () const
 True if this is a factor of discrete variables only. More...
 
bool isContinuous () const
 True if this is a factor of continuous variables only. More...
 
bool isHybrid () const
 True is this is a Discrete-Continuous factor. More...
 
size_t nrContinuous () const
 Return the number of continuous variables in this factor. More...
 
const DiscreteKeysdiscreteKeys () const
 Return the discrete keys for this factor. More...
 
const KeyVectorcontinuousKeys () const
 Return only the continuous keys for this factor. More...
 
virtual AlgebraicDecisionTree< KeyerrorTree (const VectorValues &values) const =0
 Virtual class to compute tree of linear errors. More...
 
- Public Member Functions inherited from gtsam::Factor
virtual ~Factor ()=default
 Default destructor. More...
 
bool empty () const
 Whether the factor is empty (involves zero variables). More...
 
Key front () const
 First key. More...
 
Key back () const
 Last key. More...
 
const_iterator find (Key key) const
 find More...
 
const KeyVectorkeys () const
 Access the factor's involved variable keys. More...
 
const_iterator begin () const
 
const_iterator end () const
 
virtual double error (const HybridValues &c) const
 
size_t size () const
 
virtual void printKeys (const std::string &s="Factor", const KeyFormatter &formatter=DefaultKeyFormatter) const
 print only keys More...
 
bool equals (const This &other, double tol=1e-9) const
 check equality More...
 
KeyVectorkeys ()
 
iterator begin ()
 
iterator end ()
 

Protected Attributes

KeyVector continuousKeys_
 Record continuous keys for book-keeping. More...
 
DiscreteKeys discreteKeys_
 
- Protected Attributes inherited from gtsam::Factor
KeyVector keys_
 The keys involved in this factor. More...
 

Private Attributes

Category category_ = Category::None
 Record what category of HybridFactor this is. More...
 

Additional Inherited Members

- Protected Member Functions inherited from gtsam::Factor
 Factor ()
 
template<typename CONTAINER >
 Factor (const CONTAINER &keys)
 
template<typename ITERATOR >
 Factor (ITERATOR first, ITERATOR last)
 
- Static Protected Member Functions inherited from gtsam::Factor
template<typename CONTAINER >
static Factor FromKeys (const CONTAINER &keys)
 
template<typename ITERATOR >
static Factor FromIterators (ITERATOR first, ITERATOR last)
 

Detailed Description

Base class for truly hybrid probabilistic factors

Examples:

a mixture of Gaussian and discrete distributions over a set of variables.

Definition at line 51 of file HybridFactor.h.

Member Typedef Documentation

◆ Base

Our base class.

Definition at line 71 of file HybridFactor.h.

◆ shared_ptr

shared_ptr to this class

Definition at line 70 of file HybridFactor.h.

◆ This

This class.

Definition at line 68 of file HybridFactor.h.

Member Enumeration Documentation

◆ Category

Enum to help with categorizing hybrid factors.

Enumerator
None 
Discrete 
Continuous 
Hybrid 

Definition at line 54 of file HybridFactor.h.

Constructor & Destructor Documentation

◆ HybridFactor() [1/4]

gtsam::HybridFactor::HybridFactor ( )
default

Default constructor creates empty factor

◆ HybridFactor() [2/4]

gtsam::HybridFactor::HybridFactor ( const KeyVector keys)
explicit

Construct hybrid factor from continuous keys.

Parameters
keysVector of continuous keys.

Definition at line 52 of file HybridFactor.cpp.

◆ HybridFactor() [3/4]

gtsam::HybridFactor::HybridFactor ( const DiscreteKeys discreteKeys)
explicit

Construct hybrid factor from discrete keys.

Parameters
keysVector of discrete keys.

Definition at line 79 of file HybridFactor.cpp.

◆ HybridFactor() [4/4]

gtsam::HybridFactor::HybridFactor ( const KeyVector continuousKeys,
const DiscreteKeys discreteKeys 
)

Construct a new Hybrid Factor object.

Parameters
continuousKeysVector of keys for continuous variables.
discreteKeysVector of keys for discrete variables.

Definition at line 71 of file HybridFactor.cpp.

Member Function Documentation

◆ continuousKeys()

const KeyVector& gtsam::HybridFactor::continuousKeys ( ) const
inline

Return only the continuous keys for this factor.

Definition at line 134 of file HybridFactor.h.

◆ discreteKeys()

const DiscreteKeys& gtsam::HybridFactor::discreteKeys ( ) const
inline

Return the discrete keys for this factor.

Definition at line 131 of file HybridFactor.h.

◆ equals()

bool gtsam::HybridFactor::equals ( const HybridFactor lf,
double  tol = 1e-9 
) const
virtual

◆ errorTree()

virtual AlgebraicDecisionTree<Key> gtsam::HybridFactor::errorTree ( const VectorValues values) const
pure virtual

Virtual class to compute tree of linear errors.

Implemented in gtsam::HybridConditional, gtsam::HybridGaussianFactor, and gtsam::HybridNonlinearFactor.

◆ isContinuous()

bool gtsam::HybridFactor::isContinuous ( ) const
inline

True if this is a factor of continuous variables only.

Definition at line 122 of file HybridFactor.h.

◆ isDiscrete()

bool gtsam::HybridFactor::isDiscrete ( ) const
inline

True if this is a factor of discrete variables only.

Definition at line 119 of file HybridFactor.h.

◆ isHybrid()

bool gtsam::HybridFactor::isHybrid ( ) const
inline

True is this is a Discrete-Continuous factor.

Definition at line 125 of file HybridFactor.h.

◆ nrContinuous()

size_t gtsam::HybridFactor::nrContinuous ( ) const
inline

Return the number of continuous variables in this factor.

Definition at line 128 of file HybridFactor.h.

◆ print()

void gtsam::HybridFactor::print ( const std::string &  s = "HybridFactor\n",
const KeyFormatter formatter = DefaultKeyFormatter 
) const
overridevirtual

print

Reimplemented from gtsam::Factor.

Reimplemented in gtsam::HybridGaussianConditional, gtsam::HybridNonlinearFactor, and gtsam::HybridGaussianFactor.

Definition at line 94 of file HybridFactor.cpp.

Member Data Documentation

◆ category_

Category gtsam::HybridFactor::category_ = Category::None
private

Record what category of HybridFactor this is.

Definition at line 58 of file HybridFactor.h.

◆ continuousKeys_

KeyVector gtsam::HybridFactor::continuousKeys_
protected

Record continuous keys for book-keeping.

Definition at line 64 of file HybridFactor.h.

◆ discreteKeys_

DiscreteKeys gtsam::HybridFactor::discreteKeys_
protected

Definition at line 62 of file HybridFactor.h.


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


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