300640c864fedfaba2ff31af360fd975e5db23ee,geomstats/discretized_curves_space.py,L2Metric,exp,#L2Metric#Any#Any#,84
Before Change
if tangent_vec.ndim > base_point.ndim:
mult_tangent_vecs = 1
point_shape = base_point.shape
tangent_vec_shape = tangent_vec.shape
n_coord = point_shape[-1]
shape_cumprod = np.cumprod(point_shape)
new_base_point = base_point.reshape(shape_cumprod[-2], n_coord)
if mult_tangent_vecs == 1:
new_shape = [tangent_vec.shape[0], shape_cumprod[-2], n_coord]
else:
new_shape = [shape_cumprod[-2], n_coord]
new_tangent_vec = tangent_vec.reshape(new_shape)
After Change
Riemannian exponential of a tangent vector wrt to a base curve.
tangent_vec = gs.to_ndarray(tangent_vec, to_ndim=3)
base_curve = gs.to_ndarray(base_curve, to_ndim=3)
n_curves = base_curve.shape[0]
n_sampling_points = base_curve.shape[1]
n_coords = base_curve.shape[2]
n_tangent_vecs = tangent_vec.shape[0]
new_dim = n_curves * n_sampling_points
new_base_curve = base_curve.reshape(new_dim, n_coords)
new_tangent_vec = tangent_vec.reshape(new_dim, n_coords)
exp = self.embedding_metric.exp(new_tangent_vec, new_base_curve)
exp = exp.reshape(n_tangent_vecs, n_sampling_points, n_coords)
exp = exp.squeeze()
return exp
def log(self, curve, base_curve):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 31
Instances
Project Name: geomstats/geomstats
Commit Name: 300640c864fedfaba2ff31af360fd975e5db23ee
Time: 2018-11-12
Author: alice.le-brigant@enac.fr
File Name: geomstats/discretized_curves_space.py
Class Name: L2Metric
Method Name: exp
Project Name: geomstats/geomstats
Commit Name: 300640c864fedfaba2ff31af360fd975e5db23ee
Time: 2018-11-12
Author: alice.le-brigant@enac.fr
File Name: geomstats/discretized_curves_space.py
Class Name: L2Metric
Method Name: log
Project Name: geomstats/geomstats
Commit Name: 300640c864fedfaba2ff31af360fd975e5db23ee
Time: 2018-11-12
Author: alice.le-brigant@enac.fr
File Name: geomstats/discretized_curves_space.py
Class Name: L2Metric
Method Name: dist
Project Name: geomstats/geomstats
Commit Name: 300640c864fedfaba2ff31af360fd975e5db23ee
Time: 2018-11-12
Author: alice.le-brigant@enac.fr
File Name: geomstats/discretized_curves_space.py
Class Name: L2Metric
Method Name: exp