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

64 views
Skip to first unread message

ellat

unread,
Jul 21, 2023, 4:16:16 AM7/21/23
to Ceres Solver

Hello,

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?

Sameer Agarwal

unread,
Jul 21, 2023, 9:33:21 AM7/21/23
to ceres-...@googlegroups.com
Ellat,
It is hard to tell what you are doing without seeing a fragment of example code.
Sameer


--
You received this message because you are subscribed to the Google Groups "Ceres Solver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ceres-solver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ceres-solver/77292455-2ab8-4d5d-b107-378d23319894n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages