39c16df4d13f716bd6e1c4702e32890cb5944917,geomstats/geometry/dirichlet_distributions.py,DirichletMetric,metric_matrix,#DirichletMetric#Any#,116

Before Change


                             "metric matrix")
        ones_mat = gs.ones((self.dim, self.dim))
        sum_param = gs.sum(base_point, -1)
        mat = diag(gs.polygamma(1, base_point)) \
            - gs.polygamma(1, sum_param) * ones_mat
        return mat

    def christoffels(self, base_point):
        Compute the Christoffel symbols.

After Change


        if base_point is None:
            raise ValueError("A base point must be given to compute the "
                             "metric matrix")
        base_point = gs.to_ndarray(base_point, to_ndim=2)
        n_points = base_point.shape[0]

        mat_ones = gs.ones((n_points, self.dim, self.dim))
        poly_sum = gs.polygamma(1, gs.sum(base_point, -1))
        mat_diag = gs.zeros((n_points, self.dim, self.dim))
        diag = gs.einsum("ijj->ij", mat_diag)
        diag[:] = gs.polygamma(1, base_point)

        mat = mat_diag - gs.einsum("i,ijk->ijk", poly_sum, mat_ones)
        return gs.squeeze(mat)

    def christoffels(self, base_point):
        Compute the Christoffel symbols.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: geomstats/geomstats
Commit Name: 39c16df4d13f716bd6e1c4702e32890cb5944917
Time: 2020-11-19
Author: alice.le-brigant@enac.fr
File Name: geomstats/geometry/dirichlet_distributions.py
Class Name: DirichletMetric
Method Name: metric_matrix


Project Name: geomstats/geomstats
Commit Name: 31d8076c8dd31c28054e820571ef38234950e101
Time: 2018-05-08
Author: ninamio78@gmail.com
File Name: geomstats/spd_matrices_space.py
Class Name:
Method Name: group_log


Project Name: geomstats/geomstats
Commit Name: ca7b264f69db393e3d1c704a20b4f22047d1998f
Time: 2018-05-08
Author: ninamio78@gmail.com
File Name: geomstats/spd_matrices_space.py
Class Name:
Method Name: group_exp