Passing ceres::Problem problem; to a function

15 views
Skip to first unread message

Alan Buchanan

unread,
Apr 21, 2017, 9:27:34 AM4/21/17
to Ceres Solver
Sameer,

I am trying to write a function that takes ceres::Problem problem;as a parameter.

I want to write a function for computing various statistics from my solution using the variance/covarinace matrix, jacobian etc that I can get from the ceres::Problem data structure.
.
The idea is have a single function so my code is readable and more manageable when I want to genrate statistics on the solution.

When I pass ceres::Problem I get errors associated with accessing private menbers.

Is there a simple way to pass this ?

Regards,

Alan


Sameer Agarwal

unread,
Apr 21, 2017, 9:38:37 AM4/21/17
to Ceres Solver

You are likely passing by value. Pass by reference or by pointer and you should be fine.


--
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/80c59aea-9fe1-4704-9095-5daac133ce0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages