8 #ifndef BETWEENFACTORSWITCHABLE_H_ 9 #define BETWEENFACTORSWITCHABLE_H_ 11 #include <gtsam/nonlinear/NonlinearFactor.h> 33 boost::optional<gtsam::Matrix&> H1 = boost::none,
34 boost::optional<gtsam::Matrix&> H2 = boost::none,
35 boost::optional<gtsam::Matrix&> H3 = boost::none)
const 39 gtsam::Vector error =
betweenFactor.evaluateError(p1, p2, H1, H2);
43 if (H1) *H1 = *H1 * s.
value();
44 if (H2) *H2 = *H2 * s.
value();
67 boost::optional<gtsam::Matrix&> H1 = boost::none,
68 boost::optional<gtsam::Matrix&> H2 = boost::none,
69 boost::optional<gtsam::Matrix&> H3 = boost::none)
const 73 gtsam::Vector error =
betweenFactor.evaluateError(p1, p2, H1, H2);
76 double w = sigmoid(s.
value());
80 if (H1) *H1 = *H1 * w;
81 if (H2) *H2 = *H2 * w;
91 return 1.0/(1.0+
exp(-x));
gtsam::Vector evaluateError(const VALUE &p1, const VALUE &p2, const SwitchVariableLinear &s, boost::optional< gtsam::Matrix & > H1=boost::none, boost::optional< gtsam::Matrix & > H2=boost::none, boost::optional< gtsam::Matrix & > H3=boost::none) const
BetweenFactorSwitchableSigmoid(gtsam::Key key1, gtsam::Key key2, gtsam::Key key3, const VALUE &measured, const gtsam::SharedNoiseModel &model)
BetweenFactorSwitchableLinear(gtsam::Key key1, gtsam::Key key2, gtsam::Key key3, const VALUE &measured, const gtsam::SharedNoiseModel &model)
double sigmoid(double x) const
gtsam::Vector evaluateError(const VALUE &p1, const VALUE &p2, const SwitchVariableSigmoid &s, boost::optional< gtsam::Matrix & > H1=boost::none, boost::optional< gtsam::Matrix & > H2=boost::none, boost::optional< gtsam::Matrix & > H3=boost::none) const
gtsam::BetweenFactor< VALUE > betweenFactor
BetweenFactorSwitchableLinear()
BetweenFactorSwitchableSigmoid()
GLM_FUNC_DECL genType exp(genType const &x)
gtsam::BetweenFactor< VALUE > betweenFactor