Allow ProductManifold default construction

In many cases, manifolds stored in ProductManifold have a default
constructor which can simplify ProductManifold initialization even
further. Allow default construction of ProductManifold in this case.

Change-Id: I29b2612870c02232556688019a77049709684a55
This commit is contained in:
Sergiu Deitsch
2022-03-03 10:52:16 +01:00
parent f59059fffb
commit 284be88ca1
4 changed files with 97 additions and 45 deletions
+1 -2
View File
@@ -306,8 +306,7 @@ void BuildProblem(BALProblem* bal_problem, Problem* problem) {
if (CERES_GET_FLAG(FLAGS_use_quaternions) &&
CERES_GET_FLAG(FLAGS_use_manifolds)) {
Manifold* camera_manifold =
new ProductManifold<QuaternionManifold, EuclideanManifold<6>>{
QuaternionManifold{}, EuclideanManifold<6>{}};
new ProductManifold<QuaternionManifold, EuclideanManifold<6>>{};
for (int i = 0; i < bal_problem->num_cameras(); ++i) {
problem->SetManifold(cameras + camera_block_size * i, camera_manifold);
}