Skip to content

Commit

Permalink
add using NonlinearFactor::error
Browse files Browse the repository at this point in the history
  • Loading branch information
yetongatech committed Nov 18, 2024
1 parent 90536c5 commit 037c8b3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gtsam/constraint/NonlinearConstraint.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class GTSAM_EXPORT NonlinearConstraint : public NoiseModelFactor {
/** Use constructors of NoiseModelFactor. */
using Base::Base;

using NonlinearFactor::error;

/** Destructor. */
virtual ~NonlinearConstraint() {}

Expand Down
2 changes: 2 additions & 0 deletions gtsam/nonlinear/NonlinearFactor.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,8 @@ class GTSAM_EXPORT NoiseModelFactor: public NonlinearFactor {
*/
double weight(const Values& c) const;

using NonlinearFactor::error;

/**
* Calculate the error of the factor.
* This is the log-likelihood, e.g. \f$ 0.5(h(x)-z)^2/\sigma^2 \f$ in case of Gaussian.
Expand Down

0 comments on commit 037c8b3

Please sign in to comment.