techoe / ceres-solver

Automatically exported from code.google.com/p/ceres-solver
Other
0 stars 0 forks source link

Enchancement to Take1stOrderPart #126

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I am writing my own CostFunction with auto-differentiation capabilities and I 
need to call Take1stOrderPart function with N0 template parameter known at run 
time. Could you please change it from template parameter to function parameter?

Thanks a lot!

Original issue reported on code.google.com by cdc.seac...@gmail.com on 27 Aug 2013 at 3:54

GoogleCodeExporter commented 9 years ago
This is an internal part of Ceres's code and not meant for client usage. You 
are welcome to fork it yourself in your code. Changing this in the main ceres 
codebase will lead to performance problems for everyone else.

Original comment by sameerag...@google.com on 27 Aug 2013 at 4:10

GoogleCodeExporter commented 9 years ago
Sorry if it's a stupid question, but how am I suppose to write my own 
AutoDiffCostFunction without these parts from the internal code?

Regarding the suggestion I made, N0 template parameter can not be exploited 
(optimized) at compile time anyway inside Take1stOrderPart as it is just passes 
further as a function parameter. Thanks anyway for your answer and please close 
this issue if you think so.

Original comment by cdc.seac...@gmail.com on 27 Aug 2013 at 4:40

GoogleCodeExporter commented 9 years ago
To put some context, I am writing an AutoDiffCostFunction with variable number 
of parameter blocks. Is there something similar already in ceres?

Original comment by cdc.seac...@gmail.com on 27 Aug 2013 at 4:57

GoogleCodeExporter commented 9 years ago
Yes, please take a look at DynamicAutoDiffCostFunction. It solves precisely 
this situation.

http://homes.cs.washington.edu/~sagarwal/ceres-solver/dev/modeling.html#DynamicA
utoDiffCostFunction

Original comment by sameerag...@google.com on 27 Aug 2013 at 5:03