50 throw std::runtime_error(
51 "Cannot convert an unconstrained JacobianFactor to LinearEquality");
57 throw std::runtime_error(
"Cannot convert HessianFactor to LinearEquality");
62 Base(i1, A1, b, noiseModel::Constrained::All(b.
rows())), dualKey_(
dualKey) {
68 Base(i1, A1, i2, A2, b, noiseModel::Constrained::All(b.
rows())), dualKey_(
74 const Matrix& A3,
const Vector& b,
Key dualKey) :
75 Base(i1, A1, i2, A2, i3, A3, b, noiseModel::Constrained::All(b.
rows())), dualKey_(
82 template<
typename TERMS>
84 Base(terms, b, noiseModel::Constrained::All(b.
rows())), dualKey_(
dualKey) {
98 DefaultKeyFormatter)
const {
99 Base::print(s, formatter);
105 > (boost::make_shared < LinearEquality > (*
this));
120 return unweighted_error(c);
This is the base class for all factor types.
Definition: Factor.h:54
bool isConstrained() const
is noise model constrained ?
Definition: JacobianFactor.h:238
virtual bool equals(const GaussianFactor &lf, double tol=1e-9) const
equals
Definition: LinearEquality.h:92
LinearEquality(const JacobianFactor &jf, Key dualKey)
Construct from a constrained noisemodel JacobianFactor with a dual key.
Definition: LinearEquality.h:47
LinearEquality(Key i1, const Matrix &A1, Key i2, const Matrix &A2, Key i3, const Matrix &A3, const Vector &b, Key dualKey)
Construct ternary factor.
Definition: LinearEquality.h:73
LinearEquality This
Typedef to this class.
Definition: LinearEquality.h:31
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:57
JacobianFactor Base
Typedef to base class.
Definition: LinearEquality.h:32
LinearEquality(Key i1, const Matrix &A1, const Vector &b, Key dualKey)
Construct unary factor.
Definition: LinearEquality.h:61
A helper that implements the traits interface for GTSAM types.
Definition: Testable.h:150
An abstract virtual base class for JacobianFactor and HessianFactor.
Definition: GaussianFactor.h:38
size_t rows() const
return the number of rows in the corresponding linear system
Definition: JacobianFactor.h:250
bool active() const
for active set method: equality constraints are always active
Definition: LinearEquality.h:114
virtual double error(const VectorValues &c) const
Special error for constraints.
Definition: LinearEquality.h:127
boost::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition: Key.h:33
virtual void print(const std::string &s="", const KeyFormatter &formatter=DefaultKeyFormatter) const
print
Definition: LinearEquality.h:97
Vector error_vector(const VectorValues &c) const
Special error_vector for constraints (A*x-b)
Definition: LinearEquality.h:119
virtual GaussianFactor::shared_ptr clone() const
Clone this LinearEquality.
Definition: LinearEquality.h:103
This class represents a collection of vector-valued variables associated each with a unique integer i...
Definition: VectorValues.h:73
virtual ~LinearEquality()
Virtual destructor.
Definition: LinearEquality.h:88
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
boost::shared_ptr< This > shared_ptr
shared_ptr to this class
Definition: LinearEquality.h:33
A Gaussian factor in the squared-error form.
Definition: JacobianFactor.h:87
This class defines a linear equality constraints, inheriting JacobianFactor with the special Constrai...
Definition: LinearEquality.h:29
LinearEquality(const TERMS &terms, const Vector &b, Key dualKey)
Construct an n-ary factor.
Definition: LinearEquality.h:83
LinearEquality(Key i1, const Matrix &A1, Key i2, const Matrix &A2, const Vector &b, Key dualKey)
Construct binary factor.
Definition: LinearEquality.h:66
virtual bool equals(const GaussianFactor &lf, double tol=1e-9) const
Equals for testable.
Definition: JacobianFactor.cpp:375
LinearEquality(const HessianFactor &hf)
Conversion from HessianFactor (does Cholesky to obtain Jacobian matrix)
Definition: LinearEquality.h:56
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
LinearEquality()
default constructor for I/O
Definition: LinearEquality.h:40
Key dualKey() const
dual key
Definition: LinearEquality.h:109
A Gaussian factor using the canonical parameters (information form)
Definition: HessianFactor.h:101
boost::shared_ptr< This > shared_ptr
shared_ptr to this class
Definition: GaussianFactor.h:42