#include <AntiFactor.h>
Public Types | |
typedef std::shared_ptr< AntiFactor > | shared_ptr |
Public Types inherited from gtsam::NonlinearFactor | |
typedef std::shared_ptr< This > | shared_ptr |
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 | |
bool | active (const Values &c) const override |
AntiFactor () | |
AntiFactor (NonlinearFactor::shared_ptr factor) | |
gtsam::NonlinearFactor::shared_ptr | clone () const override |
size_t | dim () const override |
bool | equals (const NonlinearFactor &expected, double tol=1e-9) const override |
double | error (const Values &c) const override |
std::shared_ptr< GaussianFactor > | linearize (const Values &c) const override |
void | print (const std::string &s, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override |
~AntiFactor () override | |
Public Member Functions inherited from gtsam::NonlinearFactor | |
NonlinearFactor () | |
template<typename CONTAINER > | |
NonlinearFactor (const CONTAINER &keys) | |
double | error (const HybridValues &c) const override |
virtual shared_ptr | rekey (const std::map< Key, Key > &rekey_mapping) const |
virtual shared_ptr | rekey (const KeyVector &new_keys) const |
virtual bool | sendable () const |
Public Member Functions inherited from gtsam::Factor | |
virtual | ~Factor ()=default |
Default destructor. More... | |
bool | empty () const |
Whether the factor is empty (involves zero variables). More... | |
Key | front () const |
First key. More... | |
Key | back () const |
Last key. More... | |
const_iterator | find (Key key) const |
find More... | |
const KeyVector & | keys () 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... | |
bool | equals (const This &other, double tol=1e-9) const |
check equality More... | |
KeyVector & | keys () |
iterator | begin () |
iterator | end () |
Private Types | |
typedef NonlinearFactor | Base |
typedef NonlinearFactor::shared_ptr | sharedFactor |
typedef AntiFactor | This |
Private Attributes | |
sharedFactor | factor_ |
Additional Inherited Members | |
Protected Types inherited from gtsam::NonlinearFactor | |
typedef Factor | Base |
typedef NonlinearFactor | This |
Protected Member Functions inherited from gtsam::Factor | |
Factor () | |
template<typename CONTAINER > | |
Factor (const CONTAINER &keys) | |
template<typename ITERATOR > | |
Factor (ITERATOR first, ITERATOR last) | |
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::Factor | |
KeyVector | keys_ |
The keys involved in this factor. More... | |
A class for downdating an existing factor from a graph. The AntiFactor returns the same linearized Hessian matrices of the original factor, but with the opposite sign. This effectively cancels out any affects of the original factor during optimization."
Definition at line 31 of file AntiFactor.h.
|
private |
Definition at line 36 of file AntiFactor.h.
typedef std::shared_ptr<AntiFactor> gtsam::AntiFactor::shared_ptr |
Definition at line 44 of file AntiFactor.h.
|
private |
Definition at line 37 of file AntiFactor.h.
|
private |
Definition at line 35 of file AntiFactor.h.
|
inline |
default constructor - only use for serialization
Definition at line 47 of file AntiFactor.h.
|
inline |
constructor - Creates the equivalent AntiFactor from an existing factor
Definition at line 50 of file AntiFactor.h.
|
inlineoverride |
Definition at line 52 of file AntiFactor.h.
|
inlineoverridevirtual |
Checks whether this factor should be used based on a set of values. The AntiFactor will have the same 'active' profile as the original factor.
Reimplemented from gtsam::NonlinearFactor.
Definition at line 89 of file AntiFactor.h.
|
inlineoverridevirtual |
Reimplemented from gtsam::NonlinearFactor.
Definition at line 55 of file AntiFactor.h.
|
inlineoverridevirtual |
get the dimension of the factor (same as the original factor)
Implements gtsam::NonlinearFactor.
Definition at line 83 of file AntiFactor.h.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
implement functions needed to derive from Factor Calculate the error of the factor For the AntiFactor, this will have the same magnitude of the original factor, but the opposite sign.
Reimplemented from gtsam::NonlinearFactor.
Definition at line 80 of file AntiFactor.h.
|
inlineoverridevirtual |
Linearize to a GaussianFactor. The AntiFactor always returns a Hessian Factor with the same Hessian matrices as the original factor (even if the original factor returns a Jacobian instead of a full Hessian), but with the opposite sign. This effectively cancels the effect of the original factor on the factor graph.
Implements gtsam::NonlinearFactor.
Definition at line 97 of file AntiFactor.h.
|
inlineoverridevirtual |
implement functions needed for Testable print
Reimplemented from gtsam::NonlinearFactor.
Definition at line 62 of file AntiFactor.h.
|
private |
Definition at line 39 of file AntiFactor.h.