Non-const operator() for CostFunctor?

46 views
Skip to first unread message

David Banas

unread,
Jan 28, 2024, 8:41:08 AMJan 28
to Ceres Solver
Is it possible to use a non-const operator() in a CostFunctor?

Sameer Agarwal

unread,
Jan 28, 2024, 1:24:34 PMJan 28
to ceres-...@googlegroups.com

No, because we need to be sure that the cost function/functor is not changing between calls.


On Sun, Jan 28, 2024, 5:41 AM David Banas <david.bana...@gmail.com> wrote:
Is it possible to use a non-const operator() in a CostFunctor?

--
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/6c059a10-5ce9-4ceb-a1b0-4146ce59f354n%40googlegroups.com.

David Banas

unread,
Jan 28, 2024, 3:34:48 PMJan 28
to Ceres Solver
Okay, thanks.

Do you have any sample code that shows how to correctly "wire in" an objective function, which must be implemented outside of the CostFunctor struct definition?
I just can't figure out how to properly dance around that existentially typed operator(); sorry. :(

Thanks,
-db

Sameer Agarwal

unread,
Jan 28, 2024, 5:00:05 PMJan 28
to ceres-...@googlegroups.com
David,
Do you have a function that computes part of whole of the objective function which is a library function that you need it call from your cost function?
In that case this section of the documentation maybe of use


Sameer


Reply all
Reply to author
Forward
0 new messages