Fixed references to dimension static member variables in constraints
parent
e5b3e127a8
commit
9367170fe5
|
@ -399,12 +399,12 @@ public:
|
|||
typedef boost::shared_ptr<NonlinearEquality1<Config, Key, X> > shared_ptr;
|
||||
|
||||
NonlinearEquality1(const X& value, const Key& key1, double mu = 1000.0)
|
||||
: Base(key1, X::dimension, mu), value_(value) {}
|
||||
: Base(key1, X::Dim(), mu), value_(value) {}
|
||||
virtual ~NonlinearEquality1() {}
|
||||
|
||||
/** g(x) with optional derivative */
|
||||
Vector evaluateError(const X& x1, boost::optional<Matrix&> H1 = boost::none) const {
|
||||
const size_t p = X::dimension;
|
||||
const size_t p = X::Dim();
|
||||
if (H1) *H1 = eye(p);
|
||||
return logmap(value_, x1);
|
||||
}
|
||||
|
@ -425,14 +425,14 @@ public:
|
|||
typedef boost::shared_ptr<NonlinearEquality2<Config, Key, X> > shared_ptr;
|
||||
|
||||
NonlinearEquality2(const Key& key1, const Key& key2, double mu = 1000.0)
|
||||
: Base(key1, key2, X::dimension, mu) {}
|
||||
: Base(key1, key2, X::Dim(), mu) {}
|
||||
virtual ~NonlinearEquality2() {}
|
||||
|
||||
/** g(x) with optional derivative2 */
|
||||
Vector evaluateError(const X& x1, const X& x2,
|
||||
boost::optional<Matrix&> H1 = boost::none,
|
||||
boost::optional<Matrix&> H2 = boost::none) const {
|
||||
const size_t p = X::dimension;
|
||||
const size_t p = X::Dim();
|
||||
if (H1) *H1 = -eye(p);
|
||||
if (H2) *H2 = eye(p);
|
||||
return logmap(x1, x2);
|
||||
|
|
|
@ -26,7 +26,7 @@ namespace gtsam {
|
|||
typedef boost::shared_ptr<BetweenConstraint<Config, Key, X> > shared_ptr;
|
||||
|
||||
BetweenConstraint(const X& measured, const Key& key1, const Key& key2, double mu = 1000.0)
|
||||
: Base(key1, key2, X::dimension, mu), measured_(measured) {}
|
||||
: Base(key1, key2, X::Dim(), mu), measured_(measured) {}
|
||||
|
||||
/** g(x) with optional derivative2 */
|
||||
Vector evaluateError(const X& x1, const X& x2,
|
||||
|
|
Loading…
Reference in New Issue