gtsam  4.1.0
gtsam
gtsam::ExpressionFactorN< T, Args > Class Template Reference

Detailed Description

template<typename T, typename... Args>
class gtsam::ExpressionFactorN< T, Args >

N-ary variadic template for ExpressionFactor meant as a base class for N-ary factors.

Enforces an 'expression' method with N keys. Derived class (an N-factor!) needs to call 'initialize'.

Does not provide backward compatible 'evaluateError'.

Template Parameters
TType for measurements. The rest of template arguments are types for the N key-indexed Values.
+ Inheritance diagram for gtsam::ExpressionFactorN< T, Args >:

Public Member Functions

virtual ~ExpressionFactorN ()=default
 Destructor.
 
virtual Expression< T > expression (const ArrayNKeys &keys) const
 Recreate expression from given keys_ and measured_, used in load Needed to deserialize a derived factor.
 
- Public Member Functions inherited from gtsam::ExpressionFactor< T >
 ExpressionFactor (const SharedNoiseModel &noiseModel, const T &measurement, const Expression< T > &expression)
 Constructor: creates a factor from a measurement and measurement function. More...
 
virtual ~ExpressionFactor ()
 Destructor.
 
const T & measured () const
 return the measurement
 
void print (const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
 print relies on Testable traits being defined for T
 
bool equals (const NonlinearFactor &f, double tol) const override
 equals relies on Testable traits being defined for T
 
Vector unwhitenedError (const Values &x, boost::optional< std::vector< Matrix > & > H=boost::none) const override
 Error function without the NoiseModel, \( z-h(x) -> Local(h(x),z) \). More...
 
boost::shared_ptr< GaussianFactorlinearize (const Values &x) const override
 
gtsam::NonlinearFactor::shared_ptr clone () const override
 

Static Public Attributes

static const std::size_t NARY_EXPRESSION_SIZE = sizeof...(Args)
 

Public Types

using ArrayNKeys = std::array< Key, NARY_EXPRESSION_SIZE >
 
- Public Types inherited from gtsam::ExpressionFactor< T >
typedef boost::shared_ptr< ExpressionFactor< T > > shared_ptr
 

Protected Member Functions

 ExpressionFactorN ()=default
 Default constructor, for serialization.
 
 ExpressionFactorN (const ArrayNKeys &keys, const SharedNoiseModel &noiseModel, const T &measurement)
 Constructor takes care of keys, but still need to call initialize.
 
- Protected Member Functions inherited from gtsam::ExpressionFactor< T >
 ExpressionFactor (const SharedNoiseModel &noiseModel, const T &measurement)
 Default constructor, for serialization. More...
 
void initialize (const Expression< T > &expression)
 Initialize with constructor arguments.
 

Friends

class boost::serialization::access
 

Additional Inherited Members

- Protected Types inherited from gtsam::ExpressionFactor< T >
typedef ExpressionFactor< T > This
 
- Protected Attributes inherited from gtsam::ExpressionFactor< T >
measured_
 the measurement to be compared with the expression
 
Expression< T > expression_
 the expression that is AD enabled
 
FastVector< int > dims_
 dimensions of the Jacobian matrices
 
- Static Protected Attributes inherited from gtsam::ExpressionFactor< T >
static const int Dim = traits<T>::dimension
 

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