Commit Graph

7 Commits

Author SHA1 Message Date
David Gossow 2a1dfd2b71 Add DynamicCostFunctionToFunctor.
This adds a new wrapper class called DynamicCostFunctionToFunctor
that closes a gap in the current API: the existing
CostFunctionToFunctor can only be used with a SizedCostFunction, where
the number and sizes of all parameter vectors are known at compile-time.
The DynamicCostFunctionToFunctor allows you to wrap a generic
CostFunction into a templated functor which can then be used in a
DynamicAutoDiffCostFunction.

Also updates the existing CostFunctionToFunctor class to internally use
DynamicCostFunctionToFunctor.

Change-Id: I088adc3271c58d2519126c27037c3576965a36d6
2015-06-18 16:01:15 -07:00
Keir Mierle 7492b0d8de Update copyright headers with new year and URL
Since Ceres is moving to using GitHub for issues, and the Google
Code URL in the current copyright header will soon become invalid,
update all the headers.

Change-Id: I1fce70375d1bcf098591f07b4d8f01a5c1e0789c
2015-03-18 05:43:23 +00:00
Sameer Agarwal bcc865f81c Remove using namespace std;
For historical reasons we had a "using namespace std;" in port.h. This
is generally a bad idea. So removing it and along the way doing a bunch
of cpplint cleanup.

Change-Id: Ia125601a55ae62695e247fb0250df4c6f86c46c6
2015-01-07 14:26:53 -08:00
Sameer Agarwal 175fa8ff09 CostFunctionToFunctor allows dynamic number of residuals.
The code itself was perfectly capable of handling residuals, but there
was an overly strict runtime check that had to be removed.

Thanks to Domink Reitzle for reporting this.

Change-Id: I6a6d000a7c5203dd5945a61b4caeda1b8aeb09c9
2014-09-02 06:52:31 -07:00
Sameer Agarwal 85561eee95 Use int32 for parameter block sizes.
CostFunction now uses int32 instead of int16
to store the size of its parameter blocks.

This is an API breaking change.

Change-Id: I032ea583bc7ea4b3009be25d23a3be143749c73e
2014-01-07 22:22:14 -08:00
Sameer Agarwal 509f68cfe3 Problem::Evaluate implementation.
1. Add Problem::Evaluate and tests.
2. Remove Solver::Summary::initial/final_*
3. Remove Solver::Options::return_* members.
4. Various cpplint cleanups.

Change-Id: I4266de53489896f72d9c6798c5efde6748d68a47
2013-02-24 19:04:21 +00:00
Sameer Agarwal 9c5acce674 Add CostFunctionToFunctor.
CostFunctionToFunctor wraps a CostFunction, and makes it available
as a templated functor that can be called from other templated
functors. This is useful for when one wants to mix automatic,
numeric and analytic differentiated functions.

Also a bug fix in autodiff.h

Change-Id: If8ba281a89fda976ef2ce10a5844a74c4ac7b84a
2013-01-18 11:43:48 -08:00