ethz-asl / curves

A library of curves for estimation.
BSD 3-Clause "New" or "Revised" License
74 stars 28 forks source link

Revisit the Evaluator interface #26

Closed furgalep closed 9 years ago

furgalep commented 10 years ago

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.

HannesSommer commented 10 years ago

You mean

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

?

furgalep commented 9 years ago

Use BAD.