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

#include <LinearInequality.h>

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

Public Types

typedef JacobianFactor Base
 Typedef to base class. More...
 
typedef boost::shared_ptr< Thisshared_ptr
 shared_ptr to this class More...
 
typedef LinearInequality This
 Typedef to this class. More...
 
- Public Types inherited from gtsam::JacobianFactor
typedef VerticalBlockMatrix::Block ABlock
 
typedef GaussianFactor Base
 Typedef to base class. More...
 
typedef ABlock::ColXpr BVector
 
typedef VerticalBlockMatrix::constBlock constABlock
 
typedef constABlock::ConstColXpr constBVector
 
typedef boost::shared_ptr< Thisshared_ptr
 shared_ptr to this class More...
 
typedef JacobianFactor This
 Typedef to this class. More...
 
- Public Types inherited from gtsam::GaussianFactor
typedef Factor Base
 Our base class. More...
 
typedef boost::shared_ptr< Thisshared_ptr
 shared_ptr to this class More...
 
typedef GaussianFactor 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

void activate ()
 Make this inequality constraint active. More...
 
bool active () const
 return true if this constraint is active More...
 
GaussianFactor::shared_ptr clone () const override
 
double dotProductRow (const VectorValues &p) const
 
Key dualKey () const
 dual key More...
 
bool equals (const GaussianFactor &lf, double tol=1e-9) const override
 
double error (const VectorValues &c) const override
 
Vector error_vector (const VectorValues &c) const
 
void inactivate ()
 Make this inequality constraint inactive. More...
 
 LinearInequality ()
 
 LinearInequality (const HessianFactor &hf)
 
 LinearInequality (const JacobianFactor &jf, Key dualKey)
 
 LinearInequality (Key i1, const RowVector &A1, double b, Key dualKey)
 
 LinearInequality (Key i1, const RowVector &A1, Key i2, const RowVector &A2, double b, Key dualKey)
 
 LinearInequality (Key i1, const RowVector &A1, Key i2, const RowVector &A2, Key i3, const RowVector &A3, double b, Key dualKey)
 
template<typename TERMS >
 LinearInequality (const TERMS &terms, double b, Key dualKey)
 
void print (const std::string &s="", const KeyFormatter &formatter=DefaultKeyFormatter) const override
 
 ~LinearInequality () override
 
- Public Member Functions inherited from gtsam::JacobianFactor
Matrix augmentedInformation () const override
 
Matrix augmentedJacobian () const override
 
Matrix augmentedJacobianUnweighted () const
 
size_t cols () const
 
std::pair< boost::shared_ptr< GaussianConditional >, shared_ptreliminate (const Ordering &keys)
 
bool empty () const override
 
Vector error_vector (const VectorValues &c) const
 
const SharedDiagonalget_model () const
 
SharedDiagonalget_model ()
 
constABlock getA (const_iterator variable) const
 
constABlock getA () const
 
ABlock getA (iterator variable)
 
ABlock getA ()
 
const constBVector getb () const
 
BVector getb ()
 
DenseIndex getDim (const_iterator variable) const override
 
Vector gradient (Key key, const VectorValues &x) const override
 Compute the gradient wrt a key at any values. More...
 
VectorValues gradientAtZero () const override
 A'*b for Jacobian. More...
 
void gradientAtZero (double *d) const override
 A'*b for Jacobian (raw memory version) More...
 
std::map< Key, MatrixhessianBlockDiagonal () const override
 Return the block diagonal of the Hessian for this factor. More...
 
void hessianDiagonal (double *d) const override
 Raw memory access version of hessianDiagonal. More...
 
void hessianDiagonalAdd (VectorValues &d) const override
 Add the current diagonal to a VectorValues instance. More...
 
Matrix information () const override
 
bool isConstrained () const
 
std::pair< Matrix, Vectorjacobian () const override
 Returns (dense) A,b pair associated with factor, bakes in the weights. More...
 
 JacobianFactor (const GaussianFactor &gf)
 
 JacobianFactor (const JacobianFactor &jf)
 
 JacobianFactor (const HessianFactor &hf)
 
 JacobianFactor ()
 
 JacobianFactor (const Vector &b_in)
 
 JacobianFactor (Key i1, const Matrix &A1, const Vector &b, const SharedDiagonal &model=SharedDiagonal())
 
 JacobianFactor (Key i1, const Matrix &A1, Key i2, const Matrix &A2, const Vector &b, const SharedDiagonal &model=SharedDiagonal())
 
 JacobianFactor (Key i1, const Matrix &A1, Key i2, const Matrix &A2, Key i3, const Matrix &A3, const Vector &b, const SharedDiagonal &model=SharedDiagonal())
 
template<typename TERMS >
 JacobianFactor (const TERMS &terms, const Vector &b, const SharedDiagonal &model=SharedDiagonal())
 
template<typename KEYS >
 JacobianFactor (const KEYS &keys, const VerticalBlockMatrix &augmentedMatrix, const SharedDiagonal &sigmas=SharedDiagonal())
 
 JacobianFactor (const GaussianFactorGraph &graph)
 
 JacobianFactor (const GaussianFactorGraph &graph, const VariableSlots &p_variableSlots)
 
 JacobianFactor (const GaussianFactorGraph &graph, const Ordering &ordering)
 
 JacobianFactor (const GaussianFactorGraph &graph, const Ordering &ordering, const VariableSlots &p_variableSlots)
 
std::pair< Matrix, VectorjacobianUnweighted () const
 Returns (dense) A,b pair associated with factor, does not bake in weights. More...
 
const VerticalBlockMatrixmatrixObject () const
 
VerticalBlockMatrixmatrixObject ()
 
void multiplyHessianAdd (double alpha, const VectorValues &x, VectorValues &y) const override
 
void multiplyHessianAdd (double alpha, const double *x, double *y, const std::vector< size_t > &accumulatedDims) const
 
GaussianFactor::shared_ptr negate () const override
 
Vector operator* (const VectorValues &x) const
 
size_t rows () const
 
void setModel (bool anyConstrained, const Vector &sigmas)
 
boost::shared_ptr< GaussianConditionalsplitConditional (size_t nrFrontals)
 
void transposeMultiplyAdd (double alpha, const Vector &e, VectorValues &x) const
 
Vector unweighted_error (const VectorValues &c) const
 
void updateHessian (const KeyVector &keys, SymmetricBlockMatrix *info) const override
 
JacobianFactor whiten () const
 
 ~JacobianFactor () override
 
- Public Member Functions inherited from gtsam::GaussianFactor
 GaussianFactor ()
 
template<typename CONTAINER >
 GaussianFactor (const CONTAINER &keys)
 
VectorValues hessianDiagonal () const
 Return the diagonal of the Hessian for this factor. More...
 
virtual ~GaussianFactor ()
 
- Public Member Functions inherited from gtsam::Factor
virtual ~Factor ()=default
 Default destructor. 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
 
size_t size () const
 
virtual void printKeys (const std::string &s="Factor", const KeyFormatter &formatter=DefaultKeyFormatter) const
 print only keys More...
 
KeyVectorkeys ()
 
iterator begin ()
 
iterator end ()
 

Private Attributes

bool active_
 
Key dualKey_
 

Additional Inherited Members

- Static Public Member Functions inherited from gtsam::GaussianFactor
template<typename CONTAINER >
static DenseIndex Slot (const CONTAINER &keys, Key key)
 
- Protected Member Functions inherited from gtsam::JacobianFactor
template<typename TERMS >
void fillTerms (const TERMS &terms, const Vector &b, const SharedDiagonal &noiseModel)
 Internal function to fill blocks and set dimensions. More...
 
- Protected Member Functions inherited from gtsam::Factor
 Factor ()
 
template<typename CONTAINER >
 Factor (const CONTAINER &keys)
 
template<typename ITERATOR >
 Factor (ITERATOR first, ITERATOR last)
 
bool equals (const This &other, double tol=1e-9) const
 check equality More...
 
- 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)
 
- Protected Attributes inherited from gtsam::JacobianFactor
VerticalBlockMatrix Ab_
 
noiseModel::Diagonal::shared_ptr model_
 
- Protected Attributes inherited from gtsam::Factor
KeyVector keys_
 The keys involved in this factor. More...
 

Detailed Description

This class defines a linear inequality constraint Ax-b <= 0, inheriting JacobianFactor with the special Constrained noise model

Definition at line 33 of file LinearInequality.h.

Member Typedef Documentation

Typedef to base class.

Definition at line 36 of file LinearInequality.h.

typedef boost::shared_ptr<This> gtsam::LinearInequality::shared_ptr

shared_ptr to this class

Definition at line 37 of file LinearInequality.h.

Typedef to this class.

Definition at line 35 of file LinearInequality.h.

Constructor & Destructor Documentation

gtsam::LinearInequality::LinearInequality ( )
inline

default constructor for I/O

Definition at line 45 of file LinearInequality.h.

gtsam::LinearInequality::LinearInequality ( const HessianFactor hf)
inlineexplicit

Conversion from HessianFactor

Definition at line 50 of file LinearInequality.h.

gtsam::LinearInequality::LinearInequality ( const JacobianFactor jf,
Key  dualKey 
)
inlineexplicit

Conversion from JacobianFactor

Definition at line 56 of file LinearInequality.h.

gtsam::LinearInequality::LinearInequality ( Key  i1,
const RowVector A1,
double  b,
Key  dualKey 
)
inline

Construct unary factor

Definition at line 69 of file LinearInequality.h.

gtsam::LinearInequality::LinearInequality ( Key  i1,
const RowVector A1,
Key  i2,
const RowVector A2,
double  b,
Key  dualKey 
)
inline

Construct binary factor

Definition at line 75 of file LinearInequality.h.

gtsam::LinearInequality::LinearInequality ( Key  i1,
const RowVector A1,
Key  i2,
const RowVector A2,
Key  i3,
const RowVector A3,
double  b,
Key  dualKey 
)
inline

Construct ternary factor

Definition at line 82 of file LinearInequality.h.

template<typename TERMS >
gtsam::LinearInequality::LinearInequality ( const TERMS &  terms,
double  b,
Key  dualKey 
)
inline

Construct an n-ary factor

Template Parameters
TERMSA container whose value type is std::pair<Key, Matrix>, specifying the collection of keys and matrices making up the factor. In this inequality factor, each matrix must have only one row!!

Definition at line 93 of file LinearInequality.h.

gtsam::LinearInequality::~LinearInequality ( )
inlineoverride

Virtual destructor

Definition at line 99 of file LinearInequality.h.

Member Function Documentation

void gtsam::LinearInequality::activate ( )
inline

Make this inequality constraint active.

Definition at line 133 of file LinearInequality.h.

bool gtsam::LinearInequality::active ( ) const
inline

return true if this constraint is active

Definition at line 128 of file LinearInequality.h.

GaussianFactor::shared_ptr gtsam::LinearInequality::clone ( ) const
inlineoverridevirtual

Clone this LinearInequality

Reimplemented from gtsam::JacobianFactor.

Definition at line 117 of file LinearInequality.h.

double gtsam::LinearInequality::dotProductRow ( const VectorValues p) const
inline

dot product of row s with the corresponding vector in p

Definition at line 153 of file LinearInequality.h.

Key gtsam::LinearInequality::dualKey ( ) const
inline

dual key

Definition at line 123 of file LinearInequality.h.

bool gtsam::LinearInequality::equals ( const GaussianFactor lf,
double  tol = 1e-9 
) const
inlineoverridevirtual

equals

Reimplemented from gtsam::JacobianFactor.

Definition at line 103 of file LinearInequality.h.

double gtsam::LinearInequality::error ( const VectorValues c) const
inlineoverridevirtual

Special error for single-valued inequality constraints.

Reimplemented from gtsam::JacobianFactor.

Definition at line 148 of file LinearInequality.h.

Vector gtsam::LinearInequality::error_vector ( const VectorValues c) const
inline

Special error_vector for constraints (A*x-b)

Definition at line 143 of file LinearInequality.h.

void gtsam::LinearInequality::inactivate ( )
inline

Make this inequality constraint inactive.

Definition at line 138 of file LinearInequality.h.

void gtsam::LinearInequality::print ( const std::string &  s = "",
const KeyFormatter formatter = DefaultKeyFormatter 
) const
inlineoverridevirtual

print

Reimplemented from gtsam::JacobianFactor.

Definition at line 108 of file LinearInequality.h.

Member Data Documentation

bool gtsam::LinearInequality::active_
private

Definition at line 41 of file LinearInequality.h.

Key gtsam::LinearInequality::dualKey_
private

Definition at line 40 of file LinearInequality.h.


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


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:58:18