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:
Sameer Agarwal
2022-02-28 11:23:43 -08:00
parent 4ad787ce19
commit 6a37fbf9b4
8 changed files with 170 additions and 109 deletions
+17 -2
View File
@@ -1475,6 +1475,21 @@ no need to use this manifold on its own. It is provided for the
purpose of testing and for use in combination with other manifolds
using :class:`ProductManifold`.
The class works with dynamic and static ambient space dimensions. If
the ambient space dimensions is known at compile time use
.. code-block:: c++
EuclideanManifold<3> manifold;
If the ambient space dimensions is not known at compile time the
template parameter needs to be set to `ceres::DYNAMIC` and the actual
dimension needs to be provided as a constructor argument:
.. code-block:: c++
EuclideanManifold<ceres::DYNAMIC> manifold(ambient_dim);
:class:`SubsetManifold`
-----------------------
@@ -1521,7 +1536,7 @@ manifold can be constructed as:
.. code-block:: c++
ProductManifold se3(new QuaternionManifold(), new EuclideanManifold(3));
ProductManifold se3(new QuaternionManifold, new EuclideanManifold<3>);
:class:`QuaternionManifold`
@@ -1617,7 +1632,7 @@ points at infinity.
The ambient space dimension is required to be greater than 1.
The class works with dynamic and static ambient space dimensions. If
the ambient space dimensions is know at compile time use
the ambient space dimensions is known at compile time use
.. code-block:: c++