30 boost::optional<Values> linearizationPoint_;
44 typedef boost::shared_ptr<This> shared_ptr;
62 void print(
const std::string& s =
"",
const KeyFormatter& keyFormatter = gtsam::DefaultKeyFormatter)
const;
65 bool equals(
const NonlinearFactor& f,
double tol = 1e-9)
const;
77 double error(
const Values& c)
const;
111 NonlinearFactor::shared_ptr negateToNonlinear()
const;
119 NonlinearFactor::shared_ptr
clone()
const {
125 inline bool hasLinearizationPoint()
const {
return linearizationPoint_.is_initialized(); }
130 bool isJacobian()
const;
131 bool isHessian()
const;
134 boost::shared_ptr<JacobianFactor> toJacobian()
const;
137 boost::shared_ptr<HessianFactor> toHessian()
const;
143 static NonlinearFactorGraph ConvertLinearGraph(
const GaussianFactorGraph& linear_graph,
144 const Values& linearizationPoint = Values());
146 #ifdef GTSAM_ALLOW_DEPRECATED_SINCE_V4 147 static NonlinearFactorGraph convertLinearGraph(
const GaussianFactorGraph& linear_graph,
148 const Values& linearizationPoint = Values()) {
149 return ConvertLinearGraph(linear_graph, linearizationPoint);
154 void initializeLinearizationPoint(
const Values& linearizationPoint);
159 friend class boost::serialization::access;
160 template<
class ARCHIVE>
161 void serialize(ARCHIVE & ar,
const unsigned int ) {
162 ar & boost::serialization::make_nvp(
"NonlinearFactor",
163 boost::serialization::base_object<Base>(*
this));
164 ar & BOOST_SERIALIZATION_NVP(factor_);
165 ar & BOOST_SERIALIZATION_NVP(linearizationPoint_);
A non-templated config holding any types of Manifold-group elements.
Definition: Values.h:70
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition: Matrix.cpp:141
Dummy version of a generic linear factor to be injected into a nonlinear factor graph.
Definition: LinearContainerFactor.h:26
A helper that implements the traits interface for GTSAM types.
Definition: Testable.h:150
const boost::optional< Values > & linearizationPoint() const
Extract the linearization point used in recalculating error.
Definition: LinearContainerFactor.h:83
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
Factor Graph Constsiting of non-linear factors.
Nonlinear factor base class.
Definition: NonlinearFactor.h:50
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
A Gaussian factor in the squared-error form.
Definition: JacobianFactor.h:87
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
NonlinearFactor::shared_ptr clone() const
Creates a shared_ptr clone of the factor - needs to be specialized to allow for subclasses.
Definition: LinearContainerFactor.h:119
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
LinearContainerFactor()
Default constructor - necessary for serialization.
Definition: LinearContainerFactor.h:33