gtsam  3.2.0
gtsam
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gtsam::RegularHessianFactor< D > Class Template Reference
+ Inheritance diagram for gtsam::RegularHessianFactor< D >:

Public Member Functions

 RegularHessianFactor (const std::vector< Key > &js, const std::vector< Matrix > &Gs, const std::vector< Vector > &gs, double f)
 Construct an n-way factor. More...
 
template<typename KEYS >
 RegularHessianFactor (const KEYS &keys, const SymmetricBlockMatrix &augmentedInformation)
 Constructor with an arbitrary number of keys and with the augmented information matrix specified as a block matrix. More...
 
void multiplyHessianAdd (double alpha, const VectorValues &x, VectorValues &y) const
 y += alpha * A'*A*x
 
void multiplyHessianAdd (double alpha, const double *x, double *yvalues) const
 y += alpha * A'*A*x
 
- Public Member Functions inherited from gtsam::HessianFactor
 HessianFactor ()
 default constructor for I/O
 
 HessianFactor (Key j, const Matrix &G, const Vector &g, double f)
 Construct a unary factor. More...
 
 HessianFactor (Key j, const Vector &mu, const Matrix &Sigma)
 Construct a unary factor, given a mean and covariance matrix. More...
 
 HessianFactor (Key j1, Key j2, const Matrix &G11, const Matrix &G12, const Vector &g1, const Matrix &G22, const Vector &g2, double f)
 Construct a binary factor. More...
 
 HessianFactor (Key j1, Key j2, Key j3, const Matrix &G11, const Matrix &G12, const Matrix &G13, const Vector &g1, const Matrix &G22, const Matrix &G23, const Vector &g2, const Matrix &G33, const Vector &g3, double f)
 Construct a ternary factor. More...
 
 HessianFactor (const std::vector< Key > &js, const std::vector< Matrix > &Gs, const std::vector< Vector > &gs, double f)
 Construct an n-way factor. More...
 
template<typename KEYS >
 HessianFactor (const KEYS &keys, const SymmetricBlockMatrix &augmentedInformation)
 Constructor with an arbitrary number of keys and with the augmented information matrix specified as a block matrix. More...
 
 HessianFactor (const JacobianFactor &cg)
 Construct from a JacobianFactor (or from a GaussianConditional since it derives from it)
 
 HessianFactor (const GaussianFactor &factor)
 Attempt to construct from any GaussianFactor - currently supports JacobianFactor, HessianFactor, GaussianConditional, or any derived classes. More...
 
 HessianFactor (const GaussianFactorGraph &factors, boost::optional< const Scatter & > scatter=boost::none)
 Combine a set of factors into a single dense HessianFactor.
 
virtual ~HessianFactor ()
 Destructor.
 
virtual GaussianFactor::shared_ptr clone () const
 Clone this HessianFactor.
 
virtual void print (const std::string &s="", const KeyFormatter &formatter=DefaultKeyFormatter) const
 Print the factor for debugging and testing (implementing Testable)
 
virtual bool equals (const GaussianFactor &lf, double tol=1e-9) const
 Compare to another factor for testing (implementing Testable)
 
virtual double error (const VectorValues &c) const
 Evaluate the factor error f(x), see above. More...
 
virtual DenseIndex getDim (const_iterator variable) const
 0.5*[x -1]'H[x -1] (also see constructor documentation) More...
 
size_t rows () const
 Return the number of columns and rows of the Hessian matrix, including the information vector. More...
 
virtual GaussianFactor::shared_ptr negate () const
 Construct the corresponding anti-factor to negate information stored stored in this factor. More...
 
virtual bool empty () const
 Check if the factor is empty. More...
 
constBlock info (const_iterator j1, const_iterator j2) const
 Return a view of the block at (j1,j2) of the upper-triangular part of the information matrix \( H \), no data is copied. More...
 
Block info (iterator j1, iterator j2)
 Return a view of the block at (j1,j2) of the upper-triangular part of the information matrix \( H \), no data is copied. More...
 
SymmetricBlockMatrix::constBlock info () const
 Return the upper-triangular part of the full augmented information matrix, as described above. More...
 
SymmetricBlockMatrix::Block info ()
 Return the upper-triangular part of the full augmented information matrix, as described above. More...
 
double constantTerm () const
 Return the constant term \( f \) as described above. More...
 
double & constantTerm ()
 Return the constant term \( f \) as described above. More...
 
constBlock::OffDiagonal::ColXpr linearTerm (const_iterator j) const
 Return the part of linear term \( g \) as described above corresponding to the requested variable. More...
 
Block::OffDiagonal::ColXpr linearTerm (iterator j)
 Return the part of linear term \( g \) as described above corresponding to the requested variable. More...
 
constBlock::OffDiagonal::ColXpr linearTerm () const
 Return the complete linear term \( g \) as described above. More...
 
Block::OffDiagonal::ColXpr linearTerm ()
 Return the complete linear term \( g \) as described above. More...
 
virtual Matrix augmentedInformation () const
 Return the augmented information matrix represented by this GaussianFactor. More...
 
virtual Matrix information () const
 Return the non-augmented information matrix represented by this GaussianFactor.
 
virtual VectorValues hessianDiagonal () const
 Return the diagonal of the Hessian for this factor.
 
virtual void hessianDiagonal (double *d) const
 Return the diagonal of the Hessian for this factor (raw memory version)
 
virtual std::map< Key, Matrix > hessianBlockDiagonal () const
 Return the block diagonal of the Hessian for this factor.
 
virtual std::pair< Matrix, Vector > jacobian () const
 Return (dense) matrix associated with factor. More...
 
virtual Matrix augmentedJacobian () const
 Return (dense) matrix associated with factor The returned system is an augmented matrix: [A b]. More...
 
const SymmetricBlockMatrixmatrixObject () const
 Return the full augmented Hessian matrix of this factor as a SymmetricBlockMatrix object. More...
 
void updateATA (const JacobianFactor &update, const Scatter &scatter)
 Update the factor by adding the information from the JacobianFactor (used internally during elimination). More...
 
void updateATA (const HessianFactor &update, const Scatter &scatter)
 Update the factor by adding the information from the HessianFactor (used internally during elimination). More...
 
void multiplyHessianAdd (double alpha, const double *x, double *y, std::vector< size_t > keys) const
 y += alpha * A'*A*x
 
VectorValues gradientAtZero () const
 eta for Hessian
 
virtual void gradientAtZero (double *d) const
 A'*b for Jacobian, eta for Hessian (raw memory version)
 
- Public Member Functions inherited from gtsam::GaussianFactor
 GaussianFactor ()
 Default constructor creates empty factor.
 
template<typename CONTAINER >
 GaussianFactor (const CONTAINER &keys)
 Construct from container of keys. More...
 
virtual ~GaussianFactor ()
 Destructor.
 
- Public Member Functions inherited from gtsam::Factor
Key front () const
 First key.
 
Key back () const
 Last key.
 
const_iterator find (Key key) const
 find
 
const FastVector< Key > & keys () const
 Access the factor's involved variable keys.
 
const_iterator begin () const
 Iterator at beginning of involved variable keys.
 
const_iterator end () const
 Iterator at end of involved variable keys.
 
size_t size () const
 
void print (const std::string &s="Factor", const KeyFormatter &formatter=DefaultKeyFormatter) const
 print
 
void printKeys (const std::string &s="Factor", const KeyFormatter &formatter=DefaultKeyFormatter) const
 print only keys
 
FastVector< Key > & keys ()
 
iterator begin ()
 Iterator at beginning of involved variable keys.
 
iterator end ()
 Iterator at end of involved variable keys.
 

Public Attributes

std::vector< DVector > y
 

Public Types

typedef Eigen::Matrix< double,
D, 1 > 
DVector
 
- Public Types inherited from gtsam::HessianFactor
typedef GaussianFactor Base
 Typedef to base class.
 
typedef HessianFactor This
 Typedef to this class.
 
typedef boost::shared_ptr< Thisshared_ptr
 A shared_ptr to this class.
 
typedef SymmetricBlockMatrix::Block Block
 A block from the Hessian matrix.
 
typedef
SymmetricBlockMatrix::constBlock 
constBlock
 A block from the Hessian matrix (const version)
 
- Public Types inherited from gtsam::GaussianFactor
typedef GaussianFactor This
 This class.
 
typedef boost::shared_ptr< Thisshared_ptr
 shared_ptr to this class
 
typedef Factor Base
 Our base class.
 
- Public Types inherited from gtsam::Factor
typedef FastVector< Key >::iterator iterator
 Iterator over keys.
 
typedef FastVector< Key >
::const_iterator 
const_iterator
 Const iterator over keys.
 

Additional Inherited Members

- Protected Member Functions inherited from gtsam::Factor
 Factor ()
 Default constructor for I/O.
 
template<typename CONTAINER >
 Factor (const CONTAINER &keys)
 Construct factor from container of keys. More...
 
template<typename ITERATOR >
 Factor (ITERATOR first, ITERATOR last)
 Construct factor from iterator keys. More...
 
bool equals (const This &other, double tol=1e-9) const
 check equality
 
- Static Protected Member Functions inherited from gtsam::Factor
template<typename CONTAINER >
static Factor FromKeys (const CONTAINER &keys)
 Construct factor from container of keys. More...
 
template<typename ITERATOR >
static Factor FromIterators (ITERATOR first, ITERATOR last)
 Construct factor from iterator keys. More...
 
- Protected Attributes inherited from gtsam::HessianFactor
SymmetricBlockMatrix info_
 The full augmented information matrix, s.t. the quadratic error is 0.5*[x -1]'H[x -1].
 
- Protected Attributes inherited from gtsam::Factor
FastVector< Keykeys_
 The keys involved in this factor.
 

Constructor & Destructor Documentation

template<size_t D>
gtsam::RegularHessianFactor< D >::RegularHessianFactor ( const std::vector< Key > &  js,
const std::vector< Matrix > &  Gs,
const std::vector< Vector > &  gs,
double  f 
)
inline

Construct an n-way factor.

Gs contains the upper-triangle blocks of the quadratic term (the Hessian matrix) provided in row-order, gs the pieces of the linear vector term, and f the constant term.

template<size_t D>
template<typename KEYS >
gtsam::RegularHessianFactor< D >::RegularHessianFactor ( const KEYS &  keys,
const SymmetricBlockMatrix augmentedInformation 
)
inline

Constructor with an arbitrary number of keys and with the augmented information matrix specified as a block matrix.


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