mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-30 00:50:37 +08:00
Add Problem::HasParameterization
This will help the transition from LocalParameterization to Manifolds, since most uses of Problem::GetParameterization is to just check whether a parameter block has a local parameterization associated with it or not. Change-Id: Ib3539f377eaed853d7542c9844ec1487aa0fb4d6
This commit is contained in:
@@ -612,6 +612,20 @@ TEST(Problem, GetParameterization) {
|
||||
EXPECT_TRUE(problem.GetParameterization(y) == NULL);
|
||||
}
|
||||
|
||||
TEST(Problem, HasParameterization) {
|
||||
double x[3];
|
||||
double y[2];
|
||||
|
||||
Problem problem;
|
||||
problem.AddParameterBlock(x, 3);
|
||||
problem.AddParameterBlock(y, 2);
|
||||
|
||||
LocalParameterization* parameterization = new IdentityParameterization(3);
|
||||
problem.SetParameterization(x, parameterization);
|
||||
EXPECT_TRUE(problem.HasParameterization(x));
|
||||
EXPECT_FALSE(problem.HasParameterization(y));
|
||||
}
|
||||
|
||||
TEST(Problem, ParameterBlockQueryTest) {
|
||||
double x[3];
|
||||
double y[4];
|
||||
|
||||
Reference in New Issue
Block a user