Пример #1
0
 def summand(k):
     exp_arg = -((dim - 1 - 2 * k)**2) / 2 / variances
     erf_arg_2 = (gs.pi * variances -
                  (dim - 1 - 2 * k) * 1j) / gs.sqrt(2 * variances)
     sign = (-1.0)**k
     comb_2 = gs.comb(k, dim - 1)
     return sign * comb_2 * gs.exp(exp_arg) * gs.real(gs.erf(erf_arg_2))
Пример #2
0
    def group_log_from_identity(self, point, point_type=None):
        """
        Group logarithm of the Lie group of
        all invertible matrices at the identity.
        """
        point = gs.to_ndarray(point, to_ndim=3)
        group_log = gs.linalg.logm(point)

        return gs.real(group_log)
Пример #3
0
    def group_exp_from_identity(self, tangent_vec, point_type=None):
        """
        Group exponential of the Lie group of
        all invertible matrices at the identity.
        """
        tangent_vec = gs.to_ndarray(tangent_vec, to_ndim=3)
        group_exp = gs.linalg.expm(tangent_vec)

        return gs.real(group_exp)
Пример #4
0
    def group_exp_from_identity(self, tangent_vec, point_type=None):
        """Compute group exponential at the identity.

        Group exponential of the Lie group of
        all invertible matrices at the identity.

        Parameters
        ----------
        tangent_vec
        point_type

        Returns
        -------
        group_exp
        """
        tangent_vec = gs.to_ndarray(tangent_vec, to_ndim=3)
        group_exp = gs.linalg.expm(tangent_vec)

        return gs.real(group_exp)
Пример #5
0
    def group_log_from_identity(self, point, point_type=None):
        """Compute group logarithm at the identity.

        Group logarithm of the Lie group of
        all invertible matrices at the identity.

        Parameters
        ----------
        point
        point_type

        Returns
        -------
        group_log
        """
        point = gs.to_ndarray(point, to_ndim=3)
        group_log = gs.linalg.logm(point)

        return gs.real(group_log)