def __init__(self, n): assert isinstance(n, int) and n > 1 self.n = n self.dimension = int((n * (n - 1)) / 2) LieGroup.__init__(self, dimension=self.dimension, identity=gs.zeros(self.dimension)) EmbeddedManifold.__init__(self, dimension=self.dimension, embedding_manifold=GeneralLinearGroup(n=n)) self.bi_invariant_metric = self.left_canonical_metric self.point_representation = 'vector' if n == 3 else 'matrix'
def __init__(self, n, point_type=None): assert isinstance(n, int) and n > 1 self.n = n self.dimension = int((n * (n - 1)) / 2) self.default_point_type = point_type if point_type is None: self.default_point_type = 'vector' if n == 3 else 'matrix' LieGroup.__init__(self, dimension=self.dimension) EmbeddedManifold.__init__(self, dimension=self.dimension, embedding_manifold=GeneralLinearGroup(n=n)) self.bi_invariant_metric = self.left_canonical_metric
class TestLieGroupMethods(geomstats.tests.TestCase): _multiprocess_can_split_ = True dimension = 4 group = LieGroup(dimension=dimension) def test_dimension(self): result = self.group.dimension expected = self.dimension self.assertAllClose(result, expected)
class TestLieGroupMethods(unittest.TestCase): _multiprocess_can_split_ = True dimension = 4 group = LieGroup(dimension=dimension, identity=gs.zeros(4))
class TestLieGroupMethods(unittest.TestCase): _multiprocess_can_split_ = True dimension = 4 group = LieGroup(dimension=dimension)
def __init__(self, n): assert isinstance(n, int) and n > 0 LieGroup.__init__(self, dimension=n * n) MatricesSpace.__init__(self, m=n, n=n)