diff --git a/.doctrees/api/geomstats.geometry.doctree b/.doctrees/api/geomstats.geometry.doctree index a9db8e0bb..58817e3d9 100644 Binary files a/.doctrees/api/geomstats.geometry.doctree and b/.doctrees/api/geomstats.geometry.doctree differ diff --git a/.doctrees/api/geomstats.test.doctree b/.doctrees/api/geomstats.test.doctree index f5f92ffc1..2cd4d881a 100644 Binary files a/.doctrees/api/geomstats.test.doctree and b/.doctrees/api/geomstats.test.doctree differ diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle index 3f9230b7e..f30425018 100644 Binary files a/.doctrees/environment.pickle and b/.doctrees/environment.pickle differ diff --git a/.doctrees/notebooks/00_foundations__introduction_to_geomstats.doctree b/.doctrees/notebooks/00_foundations__introduction_to_geomstats.doctree index cb6ad3fe1..569e2114d 100644 Binary files a/.doctrees/notebooks/00_foundations__introduction_to_geomstats.doctree and b/.doctrees/notebooks/00_foundations__introduction_to_geomstats.doctree differ diff --git a/.doctrees/notebooks/01_foundations__manifolds.doctree b/.doctrees/notebooks/01_foundations__manifolds.doctree index 579376762..b73d0a58a 100644 Binary files a/.doctrees/notebooks/01_foundations__manifolds.doctree and b/.doctrees/notebooks/01_foundations__manifolds.doctree differ diff --git a/.doctrees/notebooks/02_foundations__connection_riemannian_metric.doctree b/.doctrees/notebooks/02_foundations__connection_riemannian_metric.doctree index f77eff440..f15670c43 100644 Binary files a/.doctrees/notebooks/02_foundations__connection_riemannian_metric.doctree and b/.doctrees/notebooks/02_foundations__connection_riemannian_metric.doctree differ diff --git a/.doctrees/notebooks/11_real_world_applications__cell_shapes_analysis.doctree b/.doctrees/notebooks/11_real_world_applications__cell_shapes_analysis.doctree index 956d95954..d6cd0ca40 100644 Binary files a/.doctrees/notebooks/11_real_world_applications__cell_shapes_analysis.doctree and b/.doctrees/notebooks/11_real_world_applications__cell_shapes_analysis.doctree differ diff --git a/.doctrees/notebooks/12_real_world_applications__emg_sign_classification_in_spd_manifold.doctree b/.doctrees/notebooks/12_real_world_applications__emg_sign_classification_in_spd_manifold.doctree index 0605dce3e..7cbd843ad 100644 Binary files a/.doctrees/notebooks/12_real_world_applications__emg_sign_classification_in_spd_manifold.doctree and b/.doctrees/notebooks/12_real_world_applications__emg_sign_classification_in_spd_manifold.doctree differ diff --git a/.doctrees/notebooks/13_real_world_applications__graph_embedding_and_clustering_in_hyperbolic_space.doctree b/.doctrees/notebooks/13_real_world_applications__graph_embedding_and_clustering_in_hyperbolic_space.doctree index a679fe534..2443b280e 100644 Binary files a/.doctrees/notebooks/13_real_world_applications__graph_embedding_and_clustering_in_hyperbolic_space.doctree and b/.doctrees/notebooks/13_real_world_applications__graph_embedding_and_clustering_in_hyperbolic_space.doctree differ diff --git a/.doctrees/notebooks/14_real_world_applications__hand_poses_analysis_in_kendall_shape_space.doctree b/.doctrees/notebooks/14_real_world_applications__hand_poses_analysis_in_kendall_shape_space.doctree index 198a605e8..1e2ae1754 100644 Binary files a/.doctrees/notebooks/14_real_world_applications__hand_poses_analysis_in_kendall_shape_space.doctree and b/.doctrees/notebooks/14_real_world_applications__hand_poses_analysis_in_kendall_shape_space.doctree differ diff --git a/.doctrees/notebooks/15_real_world_applications__optic_nerve_heads_analysis_in_kendall_shape_space.doctree b/.doctrees/notebooks/15_real_world_applications__optic_nerve_heads_analysis_in_kendall_shape_space.doctree index b5156e737..fdf332e56 100644 Binary files a/.doctrees/notebooks/15_real_world_applications__optic_nerve_heads_analysis_in_kendall_shape_space.doctree and b/.doctrees/notebooks/15_real_world_applications__optic_nerve_heads_analysis_in_kendall_shape_space.doctree differ diff --git a/.doctrees/notebooks/17_foundations__stratified_spaces.doctree b/.doctrees/notebooks/17_foundations__stratified_spaces.doctree index e288c7e8c..2c6b8fec9 100644 Binary files a/.doctrees/notebooks/17_foundations__stratified_spaces.doctree and b/.doctrees/notebooks/17_foundations__stratified_spaces.doctree differ diff --git a/.doctrees/notebooks/18_real_world_applications__sao_paulo_traffic_optimization.doctree b/.doctrees/notebooks/18_real_world_applications__sao_paulo_traffic_optimization.doctree index 98f54a2a2..6fb31325f 100644 Binary files a/.doctrees/notebooks/18_real_world_applications__sao_paulo_traffic_optimization.doctree and b/.doctrees/notebooks/18_real_world_applications__sao_paulo_traffic_optimization.doctree differ diff --git a/_modules/geomstats/algebra_utils.html b/_modules/geomstats/algebra_utils.html index 80c7951b1..2a975ff15 100644 --- a/_modules/geomstats/algebra_utils.html +++ b/_modules/geomstats/algebra_utils.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/datasets/prepare_emg_data.html b/_modules/geomstats/datasets/prepare_emg_data.html index 66917f550..1685dd91b 100644 --- a/_modules/geomstats/datasets/prepare_emg_data.html +++ b/_modules/geomstats/datasets/prepare_emg_data.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/datasets/prepare_graph_data.html b/_modules/geomstats/datasets/prepare_graph_data.html index df50ea66b..c76cfbe98 100644 --- a/_modules/geomstats/datasets/prepare_graph_data.html +++ b/_modules/geomstats/datasets/prepare_graph_data.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/datasets/utils.html b/_modules/geomstats/datasets/utils.html index f47e532d1..21769006f 100644 --- a/_modules/geomstats/datasets/utils.html +++ b/_modules/geomstats/datasets/utils.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/distributions/brownian_motion.html b/_modules/geomstats/distributions/brownian_motion.html index f115ae6cc..bfa6fd313 100644 --- a/_modules/geomstats/distributions/brownian_motion.html +++ b/_modules/geomstats/distributions/brownian_motion.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/distributions/lognormal.html b/_modules/geomstats/distributions/lognormal.html index 39bfbbc61..cab4a88f5 100644 --- a/_modules/geomstats/distributions/lognormal.html +++ b/_modules/geomstats/distributions/lognormal.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/errors.html b/_modules/geomstats/errors.html index e11570df2..babf5ddac 100644 --- a/_modules/geomstats/errors.html +++ b/_modules/geomstats/errors.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/exceptions.html b/_modules/geomstats/exceptions.html index c55c96c64..a79acfb6b 100644 --- a/_modules/geomstats/exceptions.html +++ b/_modules/geomstats/exceptions.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/base.html b/_modules/geomstats/geometry/base.html index 232d77434..0926bfa33 100644 --- a/_modules/geomstats/geometry/base.html +++ b/_modules/geomstats/geometry/base.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/complex_manifold.html b/_modules/geomstats/geometry/complex_manifold.html index b20b50475..7a3be37fd 100644 --- a/_modules/geomstats/geometry/complex_manifold.html +++ b/_modules/geomstats/geometry/complex_manifold.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/complex_matrices.html b/_modules/geomstats/geometry/complex_matrices.html index 8ae18a6a8..1943f36a2 100644 --- a/_modules/geomstats/geometry/complex_matrices.html +++ b/_modules/geomstats/geometry/complex_matrices.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/complex_poincare_disk.html b/_modules/geomstats/geometry/complex_poincare_disk.html index ae2c82dbb..6d14e0d98 100644 --- a/_modules/geomstats/geometry/complex_poincare_disk.html +++ b/_modules/geomstats/geometry/complex_poincare_disk.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/complex_riemannian_metric.html b/_modules/geomstats/geometry/complex_riemannian_metric.html index fd0e0bc1b..49845918f 100644 --- a/_modules/geomstats/geometry/complex_riemannian_metric.html +++ b/_modules/geomstats/geometry/complex_riemannian_metric.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/connection.html b/_modules/geomstats/geometry/connection.html index 8ef921e83..6f8d4e8de 100644 --- a/_modules/geomstats/geometry/connection.html +++ b/_modules/geomstats/geometry/connection.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/diffeo.html b/_modules/geomstats/geometry/diffeo.html index 143372f01..bf101f21c 100644 --- a/_modules/geomstats/geometry/diffeo.html +++ b/_modules/geomstats/geometry/diffeo.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/discrete_curves.html b/_modules/geomstats/geometry/discrete_curves.html index a17dcbdbd..6bb4bb480 100644 --- a/_modules/geomstats/geometry/discrete_curves.html +++ b/_modules/geomstats/geometry/discrete_curves.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/discrete_surfaces.html b/_modules/geomstats/geometry/discrete_surfaces.html index a51faa056..8e1e4f9ef 100644 --- a/_modules/geomstats/geometry/discrete_surfaces.html +++ b/_modules/geomstats/geometry/discrete_surfaces.html @@ -45,7 +45,7 @@ - + @@ -431,6 +431,17 @@

Source code for geomstats.geometry.discrete_surfaces

"""Discrete Surfaces with Elastic metrics. Lead authors: Emmanuel Hartman, Adele Myers. + +References +---------- +.. [HSKCB2022] Emmanuel Hartman, Yashil Sukurdeep, Eric Klassen, + Nicolas Charon, and Martin Bauer. + "Elastic shape analysis of surfaces with second-order Sobolev metrics: + a comprehensive numerical framework". arXiv:2204.04238 [cs.CV], 25 Sep 2022 +.. [HPBDC2023] Emmanuel Hartman, Emery Pierson, Martin Bauer, + Mohamed Daoudi, and Nicolas Charon. + “Basis Restricted Elastic Shape Analysis on the Space of Unregistered Surfaces.” + arXiv, November 7, 2023. https://doi.org/10.48550/arXiv.2311.04382. """ import math @@ -780,8 +791,10 @@

Source code for geomstats.geometry.discrete_surfaces

return gs.sqrt(gs.linalg.det(surface_metrics_bp))
+
+[docs] @staticmethod - def _surface_metric_matrices_from_one_forms(one_forms): + def surface_metric_matrices_from_one_forms(one_forms): """Compute the surface metric matrices directly from the one_forms. This function is useful for efficiency purposes. @@ -797,7 +810,8 @@

Source code for geomstats.geometry.discrete_surfaces

Surface metric matrices evaluated at each face of the triangulated surface. """ - return gs.matmul(one_forms, Matrices.transpose(one_forms)) + return gs.matmul(one_forms, Matrices.transpose(one_forms))
+
[docs] @@ -822,7 +836,7 @@

Source code for geomstats.geometry.discrete_surfaces

the triangulated surface. """ one_forms = self.surface_one_forms(point) - return self._surface_metric_matrices_from_one_forms(one_forms)
+ return self.surface_metric_matrices_from_one_forms(one_forms)
@@ -835,6 +849,8 @@

Source code for geomstats.geometry.discrete_surfaces

:math:`\Delta_q = - Tr(g_q^{-1} \nabla^2)` where :math:`g_q` is the surface metric matrix of :math:`q`. + The area of the triangles is computed using Heron's formula. + Parameters ---------- point : array-like, shape=[..., n_vertices, 3] @@ -880,12 +896,18 @@

Source code for geomstats.geometry.discrete_surfaces

cot_flatten = gs.expand_dims(gs.reshape(cot, point.shape[:-2] + (-1,)), axis=-1) def _laplacian(tangent_vec): - """Evaluate the mesh Laplacian operator. + r"""Evaluate the mesh Laplacian operator. The operator is evaluated at a tangent vector at point to the manifold of DiscreteSurfaces. In other words, the operator is evaluated at a vector field defined on the surface point. + .. math:: + + \left(\Delta_q h\right)_{v_i}=\frac{1}{2} \sum_{\substack{j \mid(i, j) + \in E \\ \text { or }(j, i) \in E}}\left(\cot \left(\alpha_{i j} + \right)+\cot \left(\beta_{i j}\right)\right)\left(h_i-h_j\right) + Parameters ---------- tangent_vec : array-like, shape=[..., n_vertices, 3] @@ -941,7 +963,7 @@

Source code for geomstats.geometry.discrete_surfaces

"""Elastic metric defined by a family of second order Sobolev metrics. Each individual discrete surface is represented by a 2D-array of shape - `[n_vertices, 3]`. See [HSKCB2022]_ for details. + `[n_vertices, 3]`. See [HSKCB2022]_ and [HPBDC2023]_ (appendix) for details. The parameters a0, a1, b1, c1, d1, a2 (detailed below) are non-negative weighting coefficients for the different terms in the metric. @@ -971,9 +993,14 @@

Source code for geomstats.geometry.discrete_surfaces

References ---------- - .. [HSKCB2022] "Elastic shape analysis of surfaces with second-order - Sobolev metrics: a comprehensive numerical framework". - arXiv:2204.04238 [cs.CV], 25 Sep 2022 + .. [HSKCB2022] Emmanuel Hartman, Yashil Sukurdeep, Eric Klassen, + Nicolas Charon, and Martin Bauer. + "Elastic shape analysis of surfaces with second-order Sobolev metrics: + a comprehensive numerical framework". arXiv:2204.04238 [cs.CV], 25 Sep 2022 + .. [HPBDC2023] Emmanuel Hartman, Emery Pierson, Martin Bauer, + Mohamed Daoudi, and Nicolas Charon. + “Basis Restricted Elastic Shape Analysis on the Space of Unregistered Surfaces.” + arXiv, November 7, 2023. https://doi.org/10.48550/arXiv.2311.04382. """ def __init__(self, space, a0=1.0, a1=1.0, b1=1.0, c1=1.0, d1=1.0, a2=1.0): @@ -985,26 +1012,27 @@

Source code for geomstats.geometry.discrete_surfaces

self.d1 = d1 self.a2 = a2 - self.exp_solver = DiscreteSurfacesExpSolver(space, n_steps=10) + if not gs.__name__.endswith("numpy"): + self.exp_solver = DiscreteSurfacesExpSolver(space, n_steps=10) - optimizer = ScipyMinimize( - method="L-BFGS-B", - jac="autodiff", - options={"disp": False, "ftol": 0.001}, - ) - self.log_solver = PathStraightening(space, n_nodes=10, optimizer=optimizer) + optimizer = ScipyMinimize( + method="L-BFGS-B", + jac="autodiff", + options={"disp": False, "ftol": 0.001}, + ) + self.log_solver = PathStraightening(space, n_nodes=10, optimizer=optimizer) def _inner_product_a0(self, tangent_vec_a, tangent_vec_b, vertex_areas_bp): r"""Compute term of order 0 within the inner-product. Denote h and k the tangent vectors a and b respectively. - Denote q the base point, i.e. the surface. + Denote q the base point. + + This method computes :math:`G_{a_0} = a_0 <h, k>`, i.e. - The equation of the inner-product is: - :math:`\int_M (G_{a_0} + G_{a_1} + G_{b_1} + G_{c_1} + G_{d_1} + G_{a_2})vol_q`. + .. math:: - This method computes :math:`G_{a_0} = a_0 <h, k>`, - with notations taken from [HSKCB2022]_. + G_{a_0}(h, h) = \sum_{i=1}^N\left\|h_i\right\|^2 \operatorname{vol}_{x_i} Parameters ---------- @@ -1017,18 +1045,11 @@

Source code for geomstats.geometry.discrete_surfaces

Returns ------- - _ : array-like, shape=[...,] + inner_prod_a0 : array-like, shape=[...,] Term of order 0, and coefficient a0, of the inner-product. - - References - ---------- - .. [HSKCB2022] "Elastic shape analysis of surfaces with second-order - Sobolev metrics: a comprehensive numerical framework". - arXiv:2204.04238 [cs.CV], 25 Sep 2022. """ return self.a0 * gs.sum( - vertex_areas_bp - * gs.einsum("...bi,...bi->...b", tangent_vec_a, tangent_vec_b), + gs.dot(tangent_vec_a, tangent_vec_b) * vertex_areas_bp, axis=-1, ) @@ -1036,38 +1057,33 @@

Source code for geomstats.geometry.discrete_surfaces

r"""Compute a1 term of order 1 within the inner-product. Denote h and k the tangent vectors a and b respectively. - Denote q the base point, i.e. the surface. + Denote q the base point. + + This method computes :math:`G_{a_1} = a_1.g_q^{-1} <dh_m, dk_m>`, i.e. - The equation of the inner-product is: - :math:`\int_M (G_{a_0} + G_{a_1} + G_{b_1} + G_{c_1} + G_{d_1} + G_{a_2})vol_q`. + .. math:: - This method computes :math:`G_{a_1} = a_1.g_q^{-1} <dh_m, dk_m>`, - with notations taken from [HSKCB2022]_. + G_{a_1}(h, h) = \sum_{f \in F} \operatorname{tr}\left(g_f^{-1} + \delta g_f g_f^{-1} \delta g_f\right) \operatorname{vol}_f Parameters ---------- - ginvdga : array-like, shape=[n_faces, 2, 2] + ginvdga : array-like, shape=[..., n_faces, 2, 2] Product of the inverse of the surface metric matrices with their differential at a. - ginvdgb : array-like, shape=[n_faces, 2, 2] + ginvdgb : array-like, shape=[..., n_faces, 2, 2] Product of the inverse of the surface metric matrices with their differential at b. - areas_bp : array-like, shape=[n_faces,] + areas_bp : array-like, shape=[..., n_faces,] Areas of the faces of the surface given by the base point. Returns ------- - _ : array-like, shape=[...,] - Term of order 0, and coefficient a1, of the inner-product. - - References - ---------- - .. [HSKCB2022] "Elastic shape analysis of surfaces with second-order - Sobolev metrics: a comprehensive numerical framework". - arXiv:2204.04238 [cs.CV], 25 Sep 2022. + inner_prod_a1 : array-like, shape=[...,] + Term of order 1, and coefficient a1, of the inner-product. """ return self.a1 * gs.sum( - gs.einsum("...bii->...b", gs.matmul(ginvdga, ginvdgb)) * areas_bp, + gs.trace(gs.matmul(ginvdga, ginvdgb)) * areas_bp, axis=-1, ) @@ -1075,40 +1091,33 @@

Source code for geomstats.geometry.discrete_surfaces

r"""Compute b1 term of order 1 within the inner-product. Denote h and k the tangent vectors a and b respectively. - Denote q the base point, i.e. the surface. + Denote q the base point. - The equation of the inner-product is: - :math:`\int_M (G_{a_0} + G_{a_1} + G_{b_1} + G_{c_1} + G_{d_1} + G_{a_2})vol_q`. + This method computes :math:`G_{b_1} = b_1.g_q^{-1} <dh_+, dk_+>`, i.e. - This method computes :math:`G_{b_1} = b_1.g_q^{-1} <dh_+, dk_+>`, - with notations taken from [HSKCB2022]_. + .. math:: + + G_{b_1}(h, h) = \sum_{f \in F} \operatorname{tr} + \left(g_f^{-1} \delta g_f\right)^2 \operatorname{vol}_f Parameters ---------- - ginvdga : array-like, shape=[n_faces, 2, 2] + ginvdga : array-like, shape=[..., n_faces, 2, 2] Product of the inverse of the surface metric matrices with their differential at a. - ginvdgb : array-like, shape=[n_faces, 2, 2] + ginvdgb : array-like, shape=[..., n_faces, 2, 2] Product of the inverse of the surface metric matrices with their differential at b. - areas_bp : array-like, shape=[n_faces,] + areas_bp : array-like, shape=[..., n_faces,] Areas of the faces of the surface given by the base point. Returns ------- - _ : array-like, shape=[...,] - Term of order 0, and coefficient b1, of the inner-product. - - References - ---------- - .. [HSKCB2022] "Elastic shape analysis of surfaces with second-order - Sobolev metrics: a comprehensive numerical framework". - arXiv:2204.04238 [cs.CV], 25 Sep 2022. + inner_prod_b1 : array-like, shape=[...,] + Term of order 1, and coefficient b1, of the inner-product. """ return self.b1 * gs.sum( - gs.einsum("...bii->...b", ginvdga) - * gs.einsum("...bii->...b", ginvdgb) - * areas_bp, + gs.trace(ginvdga) * gs.trace(ginvdgb) * areas_bp, axis=-1, ) @@ -1116,13 +1125,15 @@

Source code for geomstats.geometry.discrete_surfaces

r"""Compute c1 term of order 1 within the inner-product. Denote h and k the tangent vectors a and b respectively. - Denote q the base point, i.e. the surface. - - The equation of the inner-product is: - :math:`\int_M (G_{a_0} + G_{a_1} + G_{b_1} + G_{c_1} + G_{d_1} + G_{a_2})vol_q`. + Denote q the base point. This method computes :math:`G_{c_1} = c_1.g_q^{-1} <dh_\perp, dk_\perp>`, - with notations taken from [HSKCB2022]_. + i.e. + + .. math:: + + G_{c_1}(h, h) = \sum_{f \in F}\left\langle\delta n_f, + \delta n_f\right\rangle \mathrm{vol}_f Parameters ---------- @@ -1130,94 +1141,80 @@

Source code for geomstats.geometry.discrete_surfaces

Point a corresponding to tangent vec a. point_b : array-like, shape=[..., n_vertices, 3] Point b corresponding to tangent vec b. - normals_bp : array-like, shape=[n_faces, 3] + normals_bp : array-like, shape=[..., n_faces, 3] Normals of each face of the surface given by the base point. - areas_bp : array-like, shape=[n_faces,] + areas_bp : array-like, shape=[..., n_faces,] Areas of the faces of the surface given by the base point. Returns ------- - _ : array-like, shape=[...,] - Term of order 0, and coefficient c1, of the inner-product. - - References - ---------- - .. [HSKCB2022] "Elastic shape analysis of surfaces with second-order - Sobolev metrics: a comprehensive numerical framework". - arXiv:2204.04238 [cs.CV], 25 Sep 2022. + inner_prod_c1 : array-like, shape=[...,] + Term of order 1, and coefficient c1, of the inner-product. """ dna = self._space.normals(point_a) - normals_bp dnb = self._space.normals(point_b) - normals_bp - return self.c1 * gs.sum( - gs.einsum("...bi,...bi->...b", dna, dnb) * areas_bp, axis=-1 - ) + + return self.c1 * gs.sum(gs.dot(dna, dnb) * areas_bp, axis=-1) def _inner_product_d1( - self, one_forms_a, one_forms_b, one_forms_bp, areas_bp, inv_surface_metrics_bp + self, one_forms_a, one_forms_b, one_forms_bp, areas_bp, ginv_bp ): r"""Compute d1 term of order 1 within the inner-product. Denote h and k the tangent vectors a and b respectively. - Denote q the base point, i.e. the surface. + Denote q the base point. - The equation of the inner-product is: - :math:`\int_M (G_{a_0} + G_{a_1} + G_{b_1} + G_{c_1} + G_{d_1} + G_{a_2})vol_q`. + This method computes :math:`G_{d_1} = d_1.g_q^{-1} <dh_0, dk_0>`, i.e. - This method computes :math:`G_{d_1} = d_1.g_q^{-1} <dh_0, dk_0>`, - with notations taken from [HSKCB2022]_. + .. math:: + + G_{d_1}(h, h) = \sum_{f \in F} \operatorname{tr}\left(g_f^{-1} + \xi_f g_f^{-1} \xi_f^T\right) \operatorname{vol}_f + + where :math:`\xi_f=d q_f^T d h_f-d h_f^T d q_f`. Parameters ---------- - one_forms_a : array-like, shape=[n_points, n_faces, 2, 3] + one_forms_a : array-like, shape=[..., n_faces, 2, 3] One forms at point a corresponding to tangent vec a. - one_forms_b : array-like, shape=[n_points, n_faces, 2, 3] + one_forms_b : array-like, shape=[..., n_faces, 2, 3] One forms at point b corresponding to tangent vec b. - one_forms_bp : array-like, shape=[n_faces, 2, 3] + one_forms_bp : array-like, shape=[..., 2, 3] One forms at base point. - areas_bp : array-like, shape=[n_faces,] + areas_bp : array-like, shape=[..., n_faces,] Areas of the faces of the surface given by the base point. - inv_surface_metrics_bp : array-like, shape=[n_faces, 2, 2] + ginv_bp : array-like, shape=[..., n_faces, 2, 2] Inverses of the surface metric matrices at each face. Returns ------- - _ : array-like, shape=[...,] - Term of order 0, and coefficient d1, of the inner-product. - - References - ---------- - .. [HSKCB2022] "Elastic shape analysis of surfaces with second-order - Sobolev metrics: a comprehensive numerical framework". - arXiv:2204.04238 [cs.CV], 25 Sep 2022. + inner_prod_d1 : array-like, shape=[...,] + Term of order 1, and coefficient d1, of the inner-product. """ one_forms_bp_t = Matrices.transpose(one_forms_bp) - one_forms_a_t = Matrices.transpose(one_forms_a) - xa = one_forms_a_t - one_forms_bp_t + aux = gs.matmul(one_forms_bp_t, ginv_bp) + xa = one_forms_a - one_forms_bp xa_0 = gs.matmul( - gs.matmul(one_forms_bp_t, inv_surface_metrics_bp), - gs.matmul(Matrices.transpose(xa), one_forms_bp_t) - - gs.matmul(one_forms_bp, xa), + aux, + gs.matmul(xa, one_forms_bp_t) + - gs.matmul(one_forms_bp, Matrices.transpose(xa)), ) - one_forms_b_t = Matrices.transpose(one_forms_b) - xb = one_forms_b_t - one_forms_bp_t + xb = one_forms_b - one_forms_bp xb_0 = gs.matmul( - gs.matmul(one_forms_bp_t, inv_surface_metrics_bp), - gs.matmul(Matrices.transpose(xb), one_forms_bp_t) - - gs.matmul(one_forms_bp, xb), + aux, + gs.matmul(xb, one_forms_bp_t) + - gs.matmul(one_forms_bp, Matrices.transpose(xb)), ) return self.d1 * gs.sum( - gs.einsum( - "...bii->...b", - gs.matmul( + gs.trace( + Matrices.mul( xa_0, - gs.matmul( - inv_surface_metrics_bp, - Matrices.transpose(xb_0), - ), + ginv_bp, + Matrices.transpose(xb_0), ), ) * areas_bp, @@ -1230,13 +1227,15 @@

Source code for geomstats.geometry.discrete_surfaces

r"""Compute term of order 2 within the inner-product. Denote h and k the tangent vectors a and b respectively. - Denote q the base point, i.e. the surface. + Denote q the base point. + + This method computes :math:`G_{a_2} = a_2 <\Delta_q h, \Delta_q k>`, i.e. - The equation of the inner-product is: - :math:`\int_M (G_{a_0} + G_{a_1} + G_{b_1} + G_{c_1} + G_{d_1} + G_{a_2})vol_q`. + .. math:: + + G_{a_2}(h, h) = \sum_{i=1}^N\left\|\left(\Delta_q h\right)_{v_i} + \right\|^2 \operatorname{vol}_{x_i} - This method computes :math:`G_{a_2} = a_2 <\Delta_q h, \Delta_q k>`, - with notations taken from [HSKCB2022]_. Parameters ---------- @@ -1244,26 +1243,19 @@

Source code for geomstats.geometry.discrete_surfaces

Tangent vector at base point. tangent_vec_b : array-like, shape=[..., n_vertices, 3] Tangent vector at base point. - base_point : array-like, shape=[n_vertices, 3] + base_point : array-like, shape=[..., n_vertices, 3] Base point, a surface i.e. the 3D coordinates of its vertices. - vertex_areas_bp : array-like, shape=[n_vertices, 1] + vertex_areas_bp : array-like, shape=[..., n_vertices, 1] Vertex areas for each vertex of the base_point. Returns ------- - _ : array-like, shape=[...,] + inner_prod_a2 : array-like, shape=[...,] Term of order 2, and coefficient a2, of the inner-product. - - References - ---------- - .. [HSKCB2022] "Elastic shape analysis of surfaces with second-order - Sobolev metrics: a comprehensive numerical framework". - arXiv:2204.04238 [cs.CV], 25 Sep 2022. """ laplacian_at_base_point = self._space.laplacian(base_point) return self.a2 * gs.sum( - gs.einsum( - "...bi,...bi->...b", + gs.dot( laplacian_at_base_point(tangent_vec_a), laplacian_at_base_point(tangent_vec_b), ) @@ -1283,7 +1275,10 @@

Source code for geomstats.geometry.discrete_surfaces

We denote q the base point, i.e. the surface. The six terms of the inner-product are given by: - :math:`\int_M (G_{a_0} + G_{a_1} + G_{b_1} + G_{c_1} + G_{d_1} + G_{a_2})vol_q` + + .. math:: + + \int_M (G_{a_0} + G_{a_1} + G_{b_1} + G_{c_1} + G_{d_1} + G_{a_2})vol_q where: @@ -1294,8 +1289,6 @@

Source code for geomstats.geometry.discrete_surfaces

- :math:`G_{d_1} = d_1.g_q^{-1} <dh_0, dk_0>` - :math:`G_{a_2} = a_2 <\Delta_q h, \Delta_q k>` - with notations taken from [HSKCB2022]_. - Parameters ---------- tangent_vec_a : array-like, shape=[..., n_vertices, 3] @@ -1309,12 +1302,6 @@

Source code for geomstats.geometry.discrete_surfaces

------- inner_prod : array-like, shape=[...] Inner-product. - - References - ---------- - .. [HSKCB2022] "Elastic shape analysis of surfaces with second-order - Sobolev metrics: a comprehensive numerical framework". - arXiv:2204.04238 [cs.CV], 25 Sep 2022. """ inner_prod_a0 = 0.0 inner_prod_a1 = 0.0 @@ -1338,7 +1325,7 @@

Source code for geomstats.geometry.discrete_surfaces

) if self.a1 > 0 or self.b1 > 0 or self.c1 > 0 or self.b1 > 0: one_forms_bp = self._space.surface_one_forms(base_point) - surface_metrics_bp = self._space._surface_metric_matrices_from_one_forms( + surface_metrics_bp = self._space.surface_metric_matrices_from_one_forms( one_forms_bp ) areas_bp = gs.sqrt(gs.linalg.det(surface_metrics_bp)) @@ -1360,19 +1347,19 @@

Source code for geomstats.geometry.discrete_surfaces

one_forms_a, one_forms_b, one_forms_bp, - areas_bp=areas_bp, - inv_surface_metrics_bp=ginv_bp, + areas_bp, + ginv_bp, ) if self.b1 > 0 or self.a1 > 0: - dga = ( - gs.matmul(one_forms_a, Matrices.transpose(one_forms_a)) - - surface_metrics_bp + surface_metrics_a = ( + self._space.surface_metric_matrices_from_one_forms(one_forms_a) ) - dgb = ( - gs.matmul(one_forms_b, Matrices.transpose(one_forms_b)) - - surface_metrics_bp + surface_metrics_b = ( + self._space.surface_metric_matrices_from_one_forms(one_forms_b) ) + dga = surface_metrics_a - surface_metrics_bp + dgb = surface_metrics_b - surface_metrics_bp ginvdga = gs.matmul(ginv_bp, dga) ginvdgb = gs.matmul(ginv_bp, dgb) if self.a1 > 0: diff --git a/_modules/geomstats/geometry/euclidean.html b/_modules/geomstats/geometry/euclidean.html index 3511930cc..e13195506 100644 --- a/_modules/geomstats/geometry/euclidean.html +++ b/_modules/geomstats/geometry/euclidean.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/fiber_bundle.html b/_modules/geomstats/geometry/fiber_bundle.html index b6133cf31..055de1b76 100644 --- a/_modules/geomstats/geometry/fiber_bundle.html +++ b/_modules/geomstats/geometry/fiber_bundle.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/full_rank_correlation_matrices.html b/_modules/geomstats/geometry/full_rank_correlation_matrices.html index 607e2fd96..a0efefd8e 100644 --- a/_modules/geomstats/geometry/full_rank_correlation_matrices.html +++ b/_modules/geomstats/geometry/full_rank_correlation_matrices.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/full_rank_matrices.html b/_modules/geomstats/geometry/full_rank_matrices.html index a91e17e10..c9279c218 100644 --- a/_modules/geomstats/geometry/full_rank_matrices.html +++ b/_modules/geomstats/geometry/full_rank_matrices.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/functions.html b/_modules/geomstats/geometry/functions.html index 324612c1a..e8f5e75a7 100644 --- a/_modules/geomstats/geometry/functions.html +++ b/_modules/geomstats/geometry/functions.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/general_linear.html b/_modules/geomstats/geometry/general_linear.html index 33b98b7dd..134b8db26 100644 --- a/_modules/geomstats/geometry/general_linear.html +++ b/_modules/geomstats/geometry/general_linear.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/grassmannian.html b/_modules/geomstats/geometry/grassmannian.html index b530d64f2..8864cb702 100644 --- a/_modules/geomstats/geometry/grassmannian.html +++ b/_modules/geomstats/geometry/grassmannian.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/group_action.html b/_modules/geomstats/geometry/group_action.html index ceba73c7e..3ea9f38fe 100644 --- a/_modules/geomstats/geometry/group_action.html +++ b/_modules/geomstats/geometry/group_action.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/heisenberg.html b/_modules/geomstats/geometry/heisenberg.html index 14fd03dd6..482558934 100644 --- a/_modules/geomstats/geometry/heisenberg.html +++ b/_modules/geomstats/geometry/heisenberg.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/hermitian.html b/_modules/geomstats/geometry/hermitian.html index eee5522d8..fffd161cb 100644 --- a/_modules/geomstats/geometry/hermitian.html +++ b/_modules/geomstats/geometry/hermitian.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/hermitian_matrices.html b/_modules/geomstats/geometry/hermitian_matrices.html index c64530e3e..79eec74a2 100644 --- a/_modules/geomstats/geometry/hermitian_matrices.html +++ b/_modules/geomstats/geometry/hermitian_matrices.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/hpd_matrices.html b/_modules/geomstats/geometry/hpd_matrices.html index d5a7fadc4..c3b97752a 100644 --- a/_modules/geomstats/geometry/hpd_matrices.html +++ b/_modules/geomstats/geometry/hpd_matrices.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/hyperbolic.html b/_modules/geomstats/geometry/hyperbolic.html index 3759e12b6..f888964cc 100644 --- a/_modules/geomstats/geometry/hyperbolic.html +++ b/_modules/geomstats/geometry/hyperbolic.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/hyperboloid.html b/_modules/geomstats/geometry/hyperboloid.html index adf2cbf52..ad5e0b033 100644 --- a/_modules/geomstats/geometry/hyperboloid.html +++ b/_modules/geomstats/geometry/hyperboloid.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/hypersphere.html b/_modules/geomstats/geometry/hypersphere.html index f065cf674..b0ae26535 100644 --- a/_modules/geomstats/geometry/hypersphere.html +++ b/_modules/geomstats/geometry/hypersphere.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/invariant_metric.html b/_modules/geomstats/geometry/invariant_metric.html index 8448ba9db..05ce065d1 100644 --- a/_modules/geomstats/geometry/invariant_metric.html +++ b/_modules/geomstats/geometry/invariant_metric.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/klein_bottle.html b/_modules/geomstats/geometry/klein_bottle.html index 6f807c4d4..2d8490647 100644 --- a/_modules/geomstats/geometry/klein_bottle.html +++ b/_modules/geomstats/geometry/klein_bottle.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/landmarks.html b/_modules/geomstats/geometry/landmarks.html index 3fc9b8f3d..73f15d846 100644 --- a/_modules/geomstats/geometry/landmarks.html +++ b/_modules/geomstats/geometry/landmarks.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/lie_algebra.html b/_modules/geomstats/geometry/lie_algebra.html index 7f05bf0a1..f7b2f70ef 100644 --- a/_modules/geomstats/geometry/lie_algebra.html +++ b/_modules/geomstats/geometry/lie_algebra.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/lie_group.html b/_modules/geomstats/geometry/lie_group.html index 5e12fede7..c876fbd54 100644 --- a/_modules/geomstats/geometry/lie_group.html +++ b/_modules/geomstats/geometry/lie_group.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/lower_triangular_matrices.html b/_modules/geomstats/geometry/lower_triangular_matrices.html index a43270288..a96fffdbd 100644 --- a/_modules/geomstats/geometry/lower_triangular_matrices.html +++ b/_modules/geomstats/geometry/lower_triangular_matrices.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/manifold.html b/_modules/geomstats/geometry/manifold.html index c74420865..2fec271c9 100644 --- a/_modules/geomstats/geometry/manifold.html +++ b/_modules/geomstats/geometry/manifold.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/matrices.html b/_modules/geomstats/geometry/matrices.html index f7ec26209..ff7ce819d 100644 --- a/_modules/geomstats/geometry/matrices.html +++ b/_modules/geomstats/geometry/matrices.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/minkowski.html b/_modules/geomstats/geometry/minkowski.html index c3e8ec36a..7d2428348 100644 --- a/_modules/geomstats/geometry/minkowski.html +++ b/_modules/geomstats/geometry/minkowski.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/nfold_manifold.html b/_modules/geomstats/geometry/nfold_manifold.html index d0bfe3e6e..25d6e9cf6 100644 --- a/_modules/geomstats/geometry/nfold_manifold.html +++ b/_modules/geomstats/geometry/nfold_manifold.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/open_hemisphere.html b/_modules/geomstats/geometry/open_hemisphere.html index 79e72c967..b7bf51282 100644 --- a/_modules/geomstats/geometry/open_hemisphere.html +++ b/_modules/geomstats/geometry/open_hemisphere.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/poincare_ball.html b/_modules/geomstats/geometry/poincare_ball.html index 195bcd122..1d516e608 100644 --- a/_modules/geomstats/geometry/poincare_ball.html +++ b/_modules/geomstats/geometry/poincare_ball.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/poincare_half_space.html b/_modules/geomstats/geometry/poincare_half_space.html index 0f5b43be2..43c08608e 100644 --- a/_modules/geomstats/geometry/poincare_half_space.html +++ b/_modules/geomstats/geometry/poincare_half_space.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/poincare_polydisk.html b/_modules/geomstats/geometry/poincare_polydisk.html index 34e0b42a0..4715deaaf 100644 --- a/_modules/geomstats/geometry/poincare_polydisk.html +++ b/_modules/geomstats/geometry/poincare_polydisk.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/positive_lower_triangular_matrices.html b/_modules/geomstats/geometry/positive_lower_triangular_matrices.html index f701074d7..8e5288d6d 100644 --- a/_modules/geomstats/geometry/positive_lower_triangular_matrices.html +++ b/_modules/geomstats/geometry/positive_lower_triangular_matrices.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/positive_reals.html b/_modules/geomstats/geometry/positive_reals.html index 856c4d9fd..4cd41936d 100644 --- a/_modules/geomstats/geometry/positive_reals.html +++ b/_modules/geomstats/geometry/positive_reals.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/pre_shape.html b/_modules/geomstats/geometry/pre_shape.html index b8866489c..2db7f496d 100644 --- a/_modules/geomstats/geometry/pre_shape.html +++ b/_modules/geomstats/geometry/pre_shape.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/product_hpd_and_siegel_disks.html b/_modules/geomstats/geometry/product_hpd_and_siegel_disks.html index 2b8361afa..3b8280e11 100644 --- a/_modules/geomstats/geometry/product_hpd_and_siegel_disks.html +++ b/_modules/geomstats/geometry/product_hpd_and_siegel_disks.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/product_manifold.html b/_modules/geomstats/geometry/product_manifold.html index fd1576e18..a73306948 100644 --- a/_modules/geomstats/geometry/product_manifold.html +++ b/_modules/geomstats/geometry/product_manifold.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/product_positive_reals_and_poincare_disks.html b/_modules/geomstats/geometry/product_positive_reals_and_poincare_disks.html index 145dede10..76e629bed 100644 --- a/_modules/geomstats/geometry/product_positive_reals_and_poincare_disks.html +++ b/_modules/geomstats/geometry/product_positive_reals_and_poincare_disks.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/pullback_metric.html b/_modules/geomstats/geometry/pullback_metric.html index 49b0b3aee..0a87f1c8a 100644 --- a/_modules/geomstats/geometry/pullback_metric.html +++ b/_modules/geomstats/geometry/pullback_metric.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/quotient_metric.html b/_modules/geomstats/geometry/quotient_metric.html index fa9293fc0..f3aaae684 100644 --- a/_modules/geomstats/geometry/quotient_metric.html +++ b/_modules/geomstats/geometry/quotient_metric.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/rank_k_psd_matrices.html b/_modules/geomstats/geometry/rank_k_psd_matrices.html index be9c0ea26..345f8435b 100644 --- a/_modules/geomstats/geometry/rank_k_psd_matrices.html +++ b/_modules/geomstats/geometry/rank_k_psd_matrices.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/riemannian_metric.html b/_modules/geomstats/geometry/riemannian_metric.html index 1e0e466f2..1eeb614ab 100644 --- a/_modules/geomstats/geometry/riemannian_metric.html +++ b/_modules/geomstats/geometry/riemannian_metric.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/sasaki_metric.html b/_modules/geomstats/geometry/sasaki_metric.html index e70e25823..eb691414d 100644 --- a/_modules/geomstats/geometry/sasaki_metric.html +++ b/_modules/geomstats/geometry/sasaki_metric.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/scalar_product_metric.html b/_modules/geomstats/geometry/scalar_product_metric.html index 004b577f9..7bf0b507d 100644 --- a/_modules/geomstats/geometry/scalar_product_metric.html +++ b/_modules/geomstats/geometry/scalar_product_metric.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/siegel.html b/_modules/geomstats/geometry/siegel.html index 20ac2e89d..324869a3c 100644 --- a/_modules/geomstats/geometry/siegel.html +++ b/_modules/geomstats/geometry/siegel.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/skew_symmetric_matrices.html b/_modules/geomstats/geometry/skew_symmetric_matrices.html index 5888648e3..596bd0a9b 100644 --- a/_modules/geomstats/geometry/skew_symmetric_matrices.html +++ b/_modules/geomstats/geometry/skew_symmetric_matrices.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/spd_matrices.html b/_modules/geomstats/geometry/spd_matrices.html index 245ee42e6..78865bc3e 100644 --- a/_modules/geomstats/geometry/spd_matrices.html +++ b/_modules/geomstats/geometry/spd_matrices.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/special_euclidean.html b/_modules/geomstats/geometry/special_euclidean.html index a684b92bb..c9833fd99 100644 --- a/_modules/geomstats/geometry/special_euclidean.html +++ b/_modules/geomstats/geometry/special_euclidean.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/special_orthogonal.html b/_modules/geomstats/geometry/special_orthogonal.html index ede7a0ba4..1fbc9891d 100644 --- a/_modules/geomstats/geometry/special_orthogonal.html +++ b/_modules/geomstats/geometry/special_orthogonal.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/stiefel.html b/_modules/geomstats/geometry/stiefel.html index 29684b196..82c26a9a4 100644 --- a/_modules/geomstats/geometry/stiefel.html +++ b/_modules/geomstats/geometry/stiefel.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/stratified/bhv_space.html b/_modules/geomstats/geometry/stratified/bhv_space.html index 37101e962..093a8bd73 100644 --- a/_modules/geomstats/geometry/stratified/bhv_space.html +++ b/_modules/geomstats/geometry/stratified/bhv_space.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/stratified/graph_space.html b/_modules/geomstats/geometry/stratified/graph_space.html index be9079371..4bcd429f4 100644 --- a/_modules/geomstats/geometry/stratified/graph_space.html +++ b/_modules/geomstats/geometry/stratified/graph_space.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/stratified/point_set.html b/_modules/geomstats/geometry/stratified/point_set.html index 7cc3b91ec..a28bdd7b8 100644 --- a/_modules/geomstats/geometry/stratified/point_set.html +++ b/_modules/geomstats/geometry/stratified/point_set.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/stratified/quotient.html b/_modules/geomstats/geometry/stratified/quotient.html index d94cb292d..ccdca9c6a 100644 --- a/_modules/geomstats/geometry/stratified/quotient.html +++ b/_modules/geomstats/geometry/stratified/quotient.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/stratified/spider.html b/_modules/geomstats/geometry/stratified/spider.html index 9cb2964a5..19e975a93 100644 --- a/_modules/geomstats/geometry/stratified/spider.html +++ b/_modules/geomstats/geometry/stratified/spider.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/stratified/trees.html b/_modules/geomstats/geometry/stratified/trees.html index 45ad343a0..e61f20c40 100644 --- a/_modules/geomstats/geometry/stratified/trees.html +++ b/_modules/geomstats/geometry/stratified/trees.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/stratified/vectorization.html b/_modules/geomstats/geometry/stratified/vectorization.html index b01faa238..bccd455ba 100644 --- a/_modules/geomstats/geometry/stratified/vectorization.html +++ b/_modules/geomstats/geometry/stratified/vectorization.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/stratified/wald_space.html b/_modules/geomstats/geometry/stratified/wald_space.html index b5f82ae3f..6902d50ee 100644 --- a/_modules/geomstats/geometry/stratified/wald_space.html +++ b/_modules/geomstats/geometry/stratified/wald_space.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/sub_riemannian_metric.html b/_modules/geomstats/geometry/sub_riemannian_metric.html index b0e927c8d..fd4126061 100644 --- a/_modules/geomstats/geometry/sub_riemannian_metric.html +++ b/_modules/geomstats/geometry/sub_riemannian_metric.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/geometry/symmetric_matrices.html b/_modules/geomstats/geometry/symmetric_matrices.html index 63c39f450..c8698ec9f 100644 --- a/_modules/geomstats/geometry/symmetric_matrices.html +++ b/_modules/geomstats/geometry/symmetric_matrices.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/information_geometry/base.html b/_modules/geomstats/information_geometry/base.html index a938e9707..3d1e3b137 100644 --- a/_modules/geomstats/information_geometry/base.html +++ b/_modules/geomstats/information_geometry/base.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/information_geometry/beta.html b/_modules/geomstats/information_geometry/beta.html index 34f1645aa..c271900f4 100644 --- a/_modules/geomstats/information_geometry/beta.html +++ b/_modules/geomstats/information_geometry/beta.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/information_geometry/binomial.html b/_modules/geomstats/information_geometry/binomial.html index 0a8e359dd..9f87cfc00 100644 --- a/_modules/geomstats/information_geometry/binomial.html +++ b/_modules/geomstats/information_geometry/binomial.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/information_geometry/categorical.html b/_modules/geomstats/information_geometry/categorical.html index 027195a3a..655e57107 100644 --- a/_modules/geomstats/information_geometry/categorical.html +++ b/_modules/geomstats/information_geometry/categorical.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/information_geometry/dirichlet.html b/_modules/geomstats/information_geometry/dirichlet.html index b91b6079d..a99b81e4a 100644 --- a/_modules/geomstats/information_geometry/dirichlet.html +++ b/_modules/geomstats/information_geometry/dirichlet.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/information_geometry/exponential.html b/_modules/geomstats/information_geometry/exponential.html index 724bd8ca4..2b9d311c0 100644 --- a/_modules/geomstats/information_geometry/exponential.html +++ b/_modules/geomstats/information_geometry/exponential.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/information_geometry/fisher_rao_metric.html b/_modules/geomstats/information_geometry/fisher_rao_metric.html index ab1a4ff1e..250876a20 100644 --- a/_modules/geomstats/information_geometry/fisher_rao_metric.html +++ b/_modules/geomstats/information_geometry/fisher_rao_metric.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/information_geometry/gamma.html b/_modules/geomstats/information_geometry/gamma.html index a9c99488f..8355d7a76 100644 --- a/_modules/geomstats/information_geometry/gamma.html +++ b/_modules/geomstats/information_geometry/gamma.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/information_geometry/geometric.html b/_modules/geomstats/information_geometry/geometric.html index a09fe3e8c..968d672f3 100644 --- a/_modules/geomstats/information_geometry/geometric.html +++ b/_modules/geomstats/information_geometry/geometric.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/information_geometry/multinomial.html b/_modules/geomstats/information_geometry/multinomial.html index 6e839ff5c..04269bfa2 100644 --- a/_modules/geomstats/information_geometry/multinomial.html +++ b/_modules/geomstats/information_geometry/multinomial.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/information_geometry/normal.html b/_modules/geomstats/information_geometry/normal.html index 6bbfe1e97..21890064a 100644 --- a/_modules/geomstats/information_geometry/normal.html +++ b/_modules/geomstats/information_geometry/normal.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/information_geometry/poisson.html b/_modules/geomstats/information_geometry/poisson.html index 274bef3b7..13a59f06e 100644 --- a/_modules/geomstats/information_geometry/poisson.html +++ b/_modules/geomstats/information_geometry/poisson.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/integrator.html b/_modules/geomstats/integrator.html index a5dd5075f..d1ff3b593 100644 --- a/_modules/geomstats/integrator.html +++ b/_modules/geomstats/integrator.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/_template.html b/_modules/geomstats/learning/_template.html index 4b4c6cb70..b77e5b558 100644 --- a/_modules/geomstats/learning/_template.html +++ b/_modules/geomstats/learning/_template.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/aac.html b/_modules/geomstats/learning/aac.html index 230bdcf15..0ad9e41a0 100644 --- a/_modules/geomstats/learning/aac.html +++ b/_modules/geomstats/learning/aac.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/agglomerative_hierarchical_clustering.html b/_modules/geomstats/learning/agglomerative_hierarchical_clustering.html index d0d531aab..68b1ee52f 100644 --- a/_modules/geomstats/learning/agglomerative_hierarchical_clustering.html +++ b/_modules/geomstats/learning/agglomerative_hierarchical_clustering.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/expectation_maximization.html b/_modules/geomstats/learning/expectation_maximization.html index f9546d08c..fe2f18bd4 100644 --- a/_modules/geomstats/learning/expectation_maximization.html +++ b/_modules/geomstats/learning/expectation_maximization.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/exponential_barycenter.html b/_modules/geomstats/learning/exponential_barycenter.html index 925a80af9..29b65a025 100644 --- a/_modules/geomstats/learning/exponential_barycenter.html +++ b/_modules/geomstats/learning/exponential_barycenter.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/frechet_mean.html b/_modules/geomstats/learning/frechet_mean.html index 553062831..dae692e41 100644 --- a/_modules/geomstats/learning/frechet_mean.html +++ b/_modules/geomstats/learning/frechet_mean.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/geodesic_regression.html b/_modules/geomstats/learning/geodesic_regression.html index 2174532c6..5b04b2b8f 100644 --- a/_modules/geomstats/learning/geodesic_regression.html +++ b/_modules/geomstats/learning/geodesic_regression.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/geometric_median.html b/_modules/geomstats/learning/geometric_median.html index 78b5ef98c..c3484f32a 100644 --- a/_modules/geomstats/learning/geometric_median.html +++ b/_modules/geomstats/learning/geometric_median.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/incremental_frechet_mean.html b/_modules/geomstats/learning/incremental_frechet_mean.html index 4223a98dc..26b0fef28 100644 --- a/_modules/geomstats/learning/incremental_frechet_mean.html +++ b/_modules/geomstats/learning/incremental_frechet_mean.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/kalman_filter.html b/_modules/geomstats/learning/kalman_filter.html index 04069b3d6..1e864dd18 100644 --- a/_modules/geomstats/learning/kalman_filter.html +++ b/_modules/geomstats/learning/kalman_filter.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/kernel_density_estimation_classifier.html b/_modules/geomstats/learning/kernel_density_estimation_classifier.html index 2a5e5887f..629ce2816 100644 --- a/_modules/geomstats/learning/kernel_density_estimation_classifier.html +++ b/_modules/geomstats/learning/kernel_density_estimation_classifier.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/kmeans.html b/_modules/geomstats/learning/kmeans.html index 889032826..39ebf38f1 100644 --- a/_modules/geomstats/learning/kmeans.html +++ b/_modules/geomstats/learning/kmeans.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/kmedoids.html b/_modules/geomstats/learning/kmedoids.html index 255203d80..53eb0c601 100644 --- a/_modules/geomstats/learning/kmedoids.html +++ b/_modules/geomstats/learning/kmedoids.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/knn.html b/_modules/geomstats/learning/knn.html index a3c2fdbf3..0e26f1863 100644 --- a/_modules/geomstats/learning/knn.html +++ b/_modules/geomstats/learning/knn.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/mdm.html b/_modules/geomstats/learning/mdm.html index 720f79cdc..242e89c60 100644 --- a/_modules/geomstats/learning/mdm.html +++ b/_modules/geomstats/learning/mdm.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/online_kmeans.html b/_modules/geomstats/learning/online_kmeans.html index 9d9b2952b..aaaf25fea 100644 --- a/_modules/geomstats/learning/online_kmeans.html +++ b/_modules/geomstats/learning/online_kmeans.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/pca.html b/_modules/geomstats/learning/pca.html index 7d1b82498..5ede3260b 100644 --- a/_modules/geomstats/learning/pca.html +++ b/_modules/geomstats/learning/pca.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/preprocessing.html b/_modules/geomstats/learning/preprocessing.html index b68d648a6..6a3d04855 100644 --- a/_modules/geomstats/learning/preprocessing.html +++ b/_modules/geomstats/learning/preprocessing.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/radial_kernel_functions.html b/_modules/geomstats/learning/radial_kernel_functions.html index 8224fa8f1..219bcfa2a 100644 --- a/_modules/geomstats/learning/radial_kernel_functions.html +++ b/_modules/geomstats/learning/radial_kernel_functions.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/riemannian_mean_shift.html b/_modules/geomstats/learning/riemannian_mean_shift.html index d59c540d7..9a76a1fff 100644 --- a/_modules/geomstats/learning/riemannian_mean_shift.html +++ b/_modules/geomstats/learning/riemannian_mean_shift.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/learning/wrapped_gaussian_process.html b/_modules/geomstats/learning/wrapped_gaussian_process.html index e51b5f348..ac75a60e9 100644 --- a/_modules/geomstats/learning/wrapped_gaussian_process.html +++ b/_modules/geomstats/learning/wrapped_gaussian_process.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/numerics/bvp.html b/_modules/geomstats/numerics/bvp.html index e082a0b08..53bdc4965 100644 --- a/_modules/geomstats/numerics/bvp.html +++ b/_modules/geomstats/numerics/bvp.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/numerics/finite_differences.html b/_modules/geomstats/numerics/finite_differences.html index a174085e7..ff5ffee0d 100644 --- a/_modules/geomstats/numerics/finite_differences.html +++ b/_modules/geomstats/numerics/finite_differences.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/numerics/geodesic.html b/_modules/geomstats/numerics/geodesic.html index f9bf43e19..e199de43e 100644 --- a/_modules/geomstats/numerics/geodesic.html +++ b/_modules/geomstats/numerics/geodesic.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/numerics/interpolation.html b/_modules/geomstats/numerics/interpolation.html index 1b8411bb9..090856800 100644 --- a/_modules/geomstats/numerics/interpolation.html +++ b/_modules/geomstats/numerics/interpolation.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/numerics/ivp.html b/_modules/geomstats/numerics/ivp.html index 4dde335ac..8806279dc 100644 --- a/_modules/geomstats/numerics/ivp.html +++ b/_modules/geomstats/numerics/ivp.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/numerics/optimizers.html b/_modules/geomstats/numerics/optimizers.html index 35ac1c78d..031914a2e 100644 --- a/_modules/geomstats/numerics/optimizers.html +++ b/_modules/geomstats/numerics/optimizers.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/numerics/path.html b/_modules/geomstats/numerics/path.html index 0229b9597..d952a27bc 100644 --- a/_modules/geomstats/numerics/path.html +++ b/_modules/geomstats/numerics/path.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/test/data.html b/_modules/geomstats/test/data.html index 8b306886b..73c9b7ef2 100644 --- a/_modules/geomstats/test/data.html +++ b/_modules/geomstats/test/data.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/test/random.html b/_modules/geomstats/test/random.html index 7cf9632ad..4c093954b 100644 --- a/_modules/geomstats/test/random.html +++ b/_modules/geomstats/test/random.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/test/utils.html b/_modules/geomstats/test/utils.html index 52a015639..7021165ee 100644 --- a/_modules/geomstats/test/utils.html +++ b/_modules/geomstats/test/utils.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/test/vectorization.html b/_modules/geomstats/test/vectorization.html index 00ae21159..86a3d7b51 100644 --- a/_modules/geomstats/test/vectorization.html +++ b/_modules/geomstats/test/vectorization.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/test_cases/learning/exponential_barycenter.html b/_modules/geomstats/test_cases/learning/exponential_barycenter.html index af34a1d41..3510816b5 100644 --- a/_modules/geomstats/test_cases/learning/exponential_barycenter.html +++ b/_modules/geomstats/test_cases/learning/exponential_barycenter.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/vectorization.html b/_modules/geomstats/vectorization.html index 2ccf35ab9..b851cd74b 100644 --- a/_modules/geomstats/vectorization.html +++ b/_modules/geomstats/vectorization.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/visualization.html b/_modules/geomstats/visualization.html index b3b546bdd..4924cf46d 100644 --- a/_modules/geomstats/visualization.html +++ b/_modules/geomstats/visualization.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/visualization/hyperbolic.html b/_modules/geomstats/visualization/hyperbolic.html index 56fa63ef0..a2e7edab9 100644 --- a/_modules/geomstats/visualization/hyperbolic.html +++ b/_modules/geomstats/visualization/hyperbolic.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/visualization/hypersphere.html b/_modules/geomstats/visualization/hypersphere.html index 443f8ed15..283811bae 100644 --- a/_modules/geomstats/visualization/hypersphere.html +++ b/_modules/geomstats/visualization/hypersphere.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/visualization/poincare_polydisk.html b/_modules/geomstats/visualization/poincare_polydisk.html index d2e765d39..4860bba7d 100644 --- a/_modules/geomstats/visualization/poincare_polydisk.html +++ b/_modules/geomstats/visualization/poincare_polydisk.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/visualization/pre_shape.html b/_modules/geomstats/visualization/pre_shape.html index 63b0e5d48..3e0f4781b 100644 --- a/_modules/geomstats/visualization/pre_shape.html +++ b/_modules/geomstats/visualization/pre_shape.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/visualization/spd_matrices.html b/_modules/geomstats/visualization/spd_matrices.html index 36ed00e43..b146d1199 100644 --- a/_modules/geomstats/visualization/spd_matrices.html +++ b/_modules/geomstats/visualization/spd_matrices.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/visualization/special_euclidean.html b/_modules/geomstats/visualization/special_euclidean.html index 2cd719d45..b1f7283a2 100644 --- a/_modules/geomstats/visualization/special_euclidean.html +++ b/_modules/geomstats/visualization/special_euclidean.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/geomstats/visualization/special_orthogonal.html b/_modules/geomstats/visualization/special_orthogonal.html index 27da4dac9..066adb81e 100644 --- a/_modules/geomstats/visualization/special_orthogonal.html +++ b/_modules/geomstats/visualization/special_orthogonal.html @@ -45,7 +45,7 @@ - + diff --git a/_modules/index.html b/_modules/index.html index 29c2b5941..5f8518464 100644 --- a/_modules/index.html +++ b/_modules/index.html @@ -45,7 +45,7 @@ - + diff --git a/api/geomstats.datasets.html b/api/geomstats.datasets.html index 745cbd73f..a266d7b02 100644 --- a/api/geomstats.datasets.html +++ b/api/geomstats.datasets.html @@ -48,7 +48,7 @@ - + diff --git a/api/geomstats.distributions.html b/api/geomstats.distributions.html index 871518609..14fe1b113 100644 --- a/api/geomstats.distributions.html +++ b/api/geomstats.distributions.html @@ -48,7 +48,7 @@ - + diff --git a/api/geomstats.geometry.html b/api/geomstats.geometry.html index aeb851003..51849864e 100644 --- a/api/geomstats.geometry.html +++ b/api/geomstats.geometry.html @@ -50,7 +50,7 @@ - + @@ -3750,6 +3750,23 @@

Submodules

geomstats.geometry.discrete_surfaces module#

Discrete Surfaces with Elastic metrics.

Lead authors: Emmanuel Hartman, Adele Myers.

+

References

+
+
+[HSKCB2022] +

Emmanuel Hartman, Yashil Sukurdeep, Eric Klassen, +Nicolas Charon, and Martin Bauer. +“Elastic shape analysis of surfaces with second-order Sobolev metrics: +a comprehensive numerical framework”. arXiv:2204.04238 [cs.CV], 25 Sep 2022

+
+
+[HPBDC2023] +

Emmanuel Hartman, Emery Pierson, Martin Bauer, +Mohamed Daoudi, and Nicolas Charon. +“Basis Restricted Elastic Shape Analysis on the Space of Unregistered Surfaces.” +arXiv, November 7, 2023. https://doi.org/10.48550/arXiv.2311.04382.

+
+
class geomstats.geometry.discrete_surfaces.DiscreteSurfaces(faces, equip=True)[source]#
@@ -3844,6 +3861,7 @@

Submodules\(q\) is defined as the operator: \(\Delta_q = - Tr(g_q^{-1} \nabla^2)\) where \(g_q\) is the surface metric matrix of \(q\).

+

The area of the triangles is computed using Heron’s formula.

Parameters:

point (array-like, shape=[…, n_vertices, 3]) – Surface, as the 3D coordinates of the vertices of its triangulation.

@@ -3920,6 +3938,22 @@

Submodules +
+static surface_metric_matrices_from_one_forms(one_forms)[source]#
+

Compute the surface metric matrices directly from the one_forms.

+

This function is useful for efficiency purposes.

+
+
Parameters:
+

one_forms (array-like, shape=[…, n_faces, 2, 3]) – One form evaluated at each face of the triangulated surface.

+
+
Returns:
+

metric_mats (array-like, shape=[…, n_faces, 2, 2]) – Surface metric matrices evaluated at each face of +the triangulated surface.

+
+
+

+
surface_one_forms(point)[source]#
@@ -4040,7 +4074,7 @@

SubmodulesRiemannianMetric

Elastic metric defined by a family of second order Sobolev metrics.

Each individual discrete surface is represented by a 2D-array of shape -[n_vertices, 3]. See [HSKCB2022] for details.

+[n_vertices, 3]. See [HSKCB2022] and [HPBDC2023] (appendix) for details.

The parameters a0, a1, b1, c1, d1, a2 (detailed below) are non-negative weighting coefficients for the different terms in the metric.

@@ -4064,11 +4098,19 @@

SubmodulesReferences

@@ -4564,7 +4597,7 @@

Submodules\(X = tangent\_vec\_a\) and \(Y = tangent\_vec\_b\) of the -total space by [ONeill] as +total space by [ONeill] as \(A_X Y = ver\nabla_{hor X} (hor Y) + hor \nabla_{hor X}( ver Y)\) where \(hor, ver\) are the horizontal and vertical projections and \(\nabla\) is the connection of the total space.

@@ -4629,7 +4662,7 @@

SubmodulesReferences

-
+
[Pennec]

Pennec, Xavier. Computing the curvature and its gradient in Kendall shape spaces. Unpublished.

@@ -5012,7 +5045,7 @@

Submodules[T2023] for more details.

+

Check out [T2023] for more details.

Parameters: