gtsam
4.0.0
gtsam
|
An equality factor that forces either one variable to a constant, or a set of variables to be equal to each other.
Depending on flag, throws an error at linearization if the constraints are not met.
Switchable implementation:
Standard Constructors | |
NonlinearEquality (Key j, const T &feasible, const CompareFunction &_compare=boost::bind(traits< T >::Equals, _1, _2, 1e-9)) | |
Constructor - forces exact evaluation. | |
NonlinearEquality (Key j, const T &feasible, double error_gain, const CompareFunction &_compare=boost::bind(traits< T >::Equals, _1, _2, 1e-9)) | |
Constructor - allows inexact evaluation. | |
Testable | |
virtual void | print (const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const |
Print. | |
virtual bool | equals (const NonlinearFactor &f, double tol=1e-9) const |
Check if two factors are equal. | |
Standard Interface | |
virtual double | error (const Values &c) const |
actual error function calculation | |
Vector | evaluateError (const T &xj, boost::optional< Matrix & > H=boost::none) const |
error function | |
virtual GaussianFactor::shared_ptr | linearize (const Values &x) const |
linearize to a GaussianFactor | |
virtual gtsam::NonlinearFactor::shared_ptr | clone () const |
Public Member Functions | |
NonlinearEquality () | |
default constructor - only for serialization | |
Public Member Functions inherited from gtsam::NoiseModelFactor1< VALUE > | |
NoiseModelFactor1 () | |
Default constructor for I/O only. | |
Key | key () const |
NoiseModelFactor1 (const SharedNoiseModel &noiseModel, Key key1) | |
Constructor. More... | |
virtual Vector | unwhitenedError (const Values &x, boost::optional< std::vector< Matrix > & > H=boost::none) const |
Calls the 1-key specific version of evaluateError, which is pure virtual so must be implemented in the derived class. | |
Public Attributes | |
CompareFunction | compare_ |
Public Types | |
typedef VALUE | T |
typedef boost::function< bool(const T &, const T &)> | CompareFunction |
Function that compares two values. | |
Public Types inherited from gtsam::NoiseModelFactor1< VALUE > | |
typedef VALUE | X |
Friends | |
class | boost::serialization::access |
Serialization function. | |
Additional Inherited Members | |
Protected Types inherited from gtsam::NoiseModelFactor1< VALUE > | |
typedef NoiseModelFactor | Base |
typedef NoiseModelFactor1< VALUE > | This |
|
inlinevirtual |
Reimplemented from gtsam::NonlinearFactor.