GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
gtsam::BinarySumExpression< T > Class Template Reference

#include <Expression.h>

Inheritance diagram for gtsam::BinarySumExpression< T >:
Inheritance graph
[legend]
Collaboration diagram for gtsam::BinarySumExpression< T >:
Collaboration graph
[legend]

Public Types

typedef Expression< T > type
 Define type so we can apply it as a meta-function.
 

Public Member Functions

 BinarySumExpression (const Expression< T > &e1, const Expression< T > &e2)
 
std::set< Keykeys () const
 Return keys that play in this expression.
 
void dims (std::map< Key, int > &map) const
 Return dimensions for each argument, as a map.
 
void print (const std::string &s) const
 Print.
 
value (const Values &values, std::vector< Matrix > *H=nullptr) const
 Return value and optional derivatives, reverse AD version Notes: this is not terribly efficient, and H should have correct size. The order of the Jacobians is same as keys in either keys() or dims()
 
value (const Values &values, std::vector< Matrix > &H) const
 
virtual std::shared_ptr< Expressionclone () const
 
const std::shared_ptr< internal::ExpressionNode< T > > & root () const
 Return root.
 
size_t traceSize () const
 Return size needed for memory buffer in traceExecution.
 
Expression< T > & operator+= (const Expression< T > &e)
 Add another expression to this expression.
 

Protected Types

typedef std::pair< KeyVector, FastVector< int > > KeysAndDims
 Keys and dimensions in same order.
 

Protected Member Functions

KeysAndDims keysAndDims () const
 
valueAndDerivatives (const Values &values, const KeyVector &keys, const FastVector< int > &dims, std::vector< Matrix > &H) const
 private version that takes keys and dimensions, returns derivatives
 
traceExecution (const Values &values, internal::ExecutionTrace< T > &trace, char *traceStorage) const
 trace execution, very unsafe
 
valueAndJacobianMap (const Values &values, internal::JacobianMap &jacobians) const
 brief Return value and derivatives, reverse AD version
 

Protected Attributes

std::shared_ptr< internal::ExpressionNode< T > > root_
 

Detailed Description

template<typename T>
class gtsam::BinarySumExpression< T >

A BinarySumExpression is a specialization of Expression that adds two expressions together It optimizes the Jacobian calculation for this specific case

Member Function Documentation

◆ clone()

template<typename T>
virtual std::shared_ptr<Expression> gtsam::Expression< T >::clone ( ) const
inlinevirtualinherited
Returns
a "deep" copy of this Expression "deep" is in quotes because the ExpressionNode hierarchy is not cloned. The intent is for derived classes to be copied using only a Base pointer.

◆ value()

template<typename T>
T gtsam::Expression< T >::value ( const Values values,
std::vector< Matrix > &  H 
) const
inlineinherited

An overload of the value function to accept reference to vector of matrices instead of a pointer to vector of matrices.


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