Go to the documentation of this file.
25 #define BETWEENFACTOR_VISIBILITY
29 #define BETWEENFACTOR_VISIBILITY GTSAM_EXPORT
63 typedef typename std::shared_ptr<BetweenFactor>
shared_ptr;
83 return std::static_pointer_cast<gtsam::NonlinearFactor>(
91 const std::string&
s =
"",
93 std::cout <<
s <<
"BetweenFactor("
94 << keyFormatter(this->
key1()) <<
","
95 << keyFormatter(this->
key2()) <<
")\n";
115 #ifdef GTSAM_SLOW_BUT_CORRECT_BETWEENFACTOR
118 if (H1) *H1 = Hlocal * (*H1);
119 if (H2) *H2 = Hlocal * (*H2);
138 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
140 friend class boost::serialization::access;
141 template<
class ARCHIVE>
142 void serialize(ARCHIVE & ar,
const unsigned int ) {
144 ar & boost::serialization::make_nvp(
"NoiseModelFactor2",
145 boost::serialization::base_object<Base>(*
this));
157 template<
class VALUE>
165 template<
class VALUE>
168 typedef std::shared_ptr<BetweenConstraint<VALUE> >
shared_ptr;
179 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION
180 friend class boost::serialization::access;
181 template<
class ARCHIVE>
182 void serialize(ARCHIVE & ar,
const unsigned int ) {
183 ar & boost::serialization::make_nvp(
"BetweenFactor",
190 template<
class VALUE>
std::shared_ptr< This > shared_ptr
std::shared_ptr< BetweenConstraint< VALUE > > shared_ptr
BetweenFactor< VALUE > This
BetweenFactor(Key key1, Key key2, const VALUE &measured, const SharedNoiseModel &model=nullptr)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Concept check for values that can be used in unit tests.
~BetweenFactor() override
virtual Vector evaluateError(const ValueTypes &... x, OptionalMatrixTypeT< ValueTypes >... H) const=0
constexpr static auto NeedsToAlign
void print(const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const override
print with optional string
SharedNoiseModel noiseModel_
BetweenConstraint(const VALUE &measured, Key key1, Key key2, double mu=1000.0)
NoiseModelFactorN< VALUE, VALUE > Base
GTSAM_CONCEPT_ASSERT(IsTestable< VALUE >)
KeyFormatter DefaultKeyFormatter
Assign default key formatter.
const SharedNoiseModel & noiseModel() const
access to the noise model
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
std::shared_ptr< BetweenFactor > shared_ptr
bool equals(const NonlinearFactor &expected, double tol=1e-9) const override
assert equality up to a tolerance
bool equals(const NonlinearFactor &f, double tol=1e-9) const override
noiseModel::Base::shared_ptr SharedNoiseModel
noiseModel::Diagonal::shared_ptr model
Non-linear factor base classes.
BetweenFactor< Rot3 > Between
Base class and basic functions for Lie types.
Vector evaluateError(const T &p1, const T &p2, OptionalMatrixType H1, OptionalMatrixType H2) const override
evaluate error, returns vector of errors size of tangent space
gtsam::NonlinearFactor::shared_ptr clone() const override
void Print(const CONTAINER &keys, const string &s, const KeyFormatter &keyFormatter)
Matrix * OptionalMatrixType
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
std::uint64_t Key
Integer nonlinear key type.
const VALUE & measured() const
return the measurement
gtsam
Author(s):
autogenerated on Thu Dec 19 2024 04:00:45