How to modify an Eigen::Matrix row passed to a ceres cost function?

41 views Asked by At

I have a matrix defined as follows:

Eigen::Matrix<double, Eigen::Dynamic, Eigen::dynamic, Eigen::RowMajor > newEigenMat;

I am passing it row by row to a Ceres cost function. The value I pass is:

newEigenMat.row(i).data()

I would like to modify this row from within the Ceres cost function.

If I try to access it as a normal Eigen vector like so: inputRow(i) = val;

Ceres gives me the error: inputRow cannot be used as a function.

How can I do it correctly please?

0

There are 0 answers