ethz-asl/curves

Revisit the Evaluator interface

Closed this issue · 2 comments

We can make this abstract by defining a pure virtual object (to wrap the Values and std::vector<Matrix> that show up in the GTSAM NonLinearFactor.

Something like:

class EvaluatorCoefficients {
public:
  // Get the coefficient associated with this key
  const Coefficient& coefficient(const Key& key) const = 0;
  // Set the Jacobian of this coefficient
  void setJacobian( const Key& key, const Eigen::MatrixXd& Jk) = 0;
};

Then the implementation could handle everything without an extra copy.

You mean

void setJacobian( const Key& key, Eigen::MatrixXd* Jk) = 0;

?

Use BAD.