mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-30 00:50:37 +08:00
Add static/compile time sizing to EuclideanManifold
This brings it in line with other manifolds like SphereManifold and LineManifold, where the user has the choice to specify the size of the manifold at compile time or runtime. Most of the time the size is known at compile time so this will speed up the common case. Change-Id: I0c7ff8b7a9a64a81203eb11afc074874e208815a
This commit is contained in:
@@ -107,7 +107,7 @@ TEST(GradientProblem, EvaluationWithParameterizationAndWithGradient) {
|
||||
|
||||
TEST(GradientProblem, EvalutaionWithManifoldAndNoGradient) {
|
||||
ceres::GradientProblem problem(new QuadraticTestFunction(),
|
||||
new EuclideanManifold(1));
|
||||
new EuclideanManifold<1>);
|
||||
double x = 7.0;
|
||||
double cost = 0;
|
||||
problem.Evaluate(&x, &cost, nullptr);
|
||||
@@ -125,7 +125,7 @@ TEST(GradientProblem, EvaluationWithoutManifoldAndWithGradient) {
|
||||
|
||||
TEST(GradientProblem, EvaluationWithManifoldAndWithGradient) {
|
||||
ceres::GradientProblem problem(new QuadraticTestFunction(),
|
||||
new EuclideanManifold(1));
|
||||
new EuclideanManifold<1>);
|
||||
double x = 7.0;
|
||||
double cost = 0;
|
||||
double gradient = 0;
|
||||
|
||||
Reference in New Issue
Block a user