Public Types | Public Member Functions | Private Types | List of all members
gtsam::InequalityFactorGraph Class Reference

#include <InequalityFactorGraph.h>

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

Public Types

typedef std::shared_ptr< InequalityFactorGraphshared_ptr
 
- Public Types inherited from gtsam::FactorGraph< LinearInequality >
typedef FastVector< sharedFactor >::const_iterator const_iterator
 
typedef LinearInequality FactorType
 factor type More...
 
typedef FastVector< sharedFactor >::iterator iterator
 
typedef std::shared_ptr< LinearInequalitysharedFactor
 Shared pointer to a factor. More...
 
typedef sharedFactor value_type
 

Public Member Functions

template<class... Args>
void add (Args &&... args)
 Add a linear inequality, forwards arguments to LinearInequality. More...
 
bool equals (const InequalityFactorGraph &other, double tol=1e-9) const
 
double error (const VectorValues &x) const
 
void print (const std::string &str="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
 
- Public Member Functions inherited from gtsam::FactorGraph< LinearInequality >
 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)
 
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
 

Private Types

typedef FactorGraph< LinearInequalityBase
 

Additional Inherited Members

- Protected Member Functions inherited from gtsam::FactorGraph< LinearInequality >
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< LinearInequality >
FastVector< sharedFactorfactors_
 

Detailed Description

Collection of all Linear Inequality constraints Ax-b <= 0 of a Programming problem as a Factor Graph

Definition at line 32 of file InequalityFactorGraph.h.

Member Typedef Documentation

◆ Base

Definition at line 34 of file InequalityFactorGraph.h.

◆ shared_ptr

Definition at line 37 of file InequalityFactorGraph.h.

Member Function Documentation

◆ add()

template<class... Args>
void gtsam::InequalityFactorGraph::add ( Args &&...  args)
inline

Add a linear inequality, forwards arguments to LinearInequality.

Definition at line 52 of file InequalityFactorGraph.h.

◆ equals()

bool gtsam::InequalityFactorGraph::equals ( const InequalityFactorGraph other,
double  tol = 1e-9 
) const
inline

equals

Definition at line 47 of file InequalityFactorGraph.h.

◆ error()

double gtsam::InequalityFactorGraph::error ( const VectorValues x) const
inline

Compute error of a guess. Infinity error if it violates an inequality; zero otherwise.

Definition at line 59 of file InequalityFactorGraph.h.

◆ print()

void gtsam::InequalityFactorGraph::print ( const std::string &  str = "",
const KeyFormatter keyFormatter = DefaultKeyFormatter 
) const
inlineoverridevirtual

print

Reimplemented from gtsam::FactorGraph< LinearInequality >.

Definition at line 40 of file InequalityFactorGraph.h.


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


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