27using JacobianVector = std::vector<Matrix>;
56 CustomErrorFunction error_function_;
78 this->error_function_ = errorFunction;
88 void print(
const std::string &s,
100#if GTSAM_ENABLE_BOOST_SERIALIZATION
102 friend class boost::serialization::access;
103 template<
class ARCHIVE>
104 void serialize(ARCHIVE &ar,
const unsigned int ) {
105 ar & boost::serialization::make_nvp(
"CustomFactor",
106 boost::serialization::base_object<Base>(*
this));
Non-linear factor base classes.
Global functions in a separate testing namespace.
Definition chartTesting.h:28
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
Definition Key.cpp:30
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
Definition Key.h:91
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition Matrix.cpp:143
std::optional< std::reference_wrapper< JacobianVector > > OptionalJacobianVector
Jacobians handed to the Python callback, absent when only the error is wanted.
Definition CustomFactor.h:32
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition Key.h:35
std::vector< Matrix > * OptionalMatrixVecType
The OptionalMatrixVecType is a pointer to a vector of matrices.
Definition NonlinearFactor.h:63
noiseModel::Base::shared_ptr SharedNoiseModel
Aliases.
Definition NoiseModel.h:846
const KeyVector & keys() const
Access the factor's involved variable keys.
Definition Factor.h:143
Definition CustomFactor.h:54
CustomFactor(const SharedNoiseModel &noiseModel, const KeyVector &keys, const CustomErrorFunction &errorFunction)
Constructor.
Definition CustomFactor.h:76
CustomFactor()=default
Default Constructor for I/O.
bool sendable() const override
Mark not sendable.
Definition CustomFactor.h:94
NoiseModelFactor()
Default constructor for I/O only.
Definition NonlinearFactor.h:223
const SharedNoiseModel & noiseModel() const
access to the noise model
Definition NonlinearFactor.h:258
A non-templated config holding any types of Manifold-group elements.
Definition Values.h:65