Home | Trees | Indices | Help |
|
---|
|
1 from geometry import MatrixLieGroup 2 from nose.plugins.attrib import attr 3 from geometry.manifolds.tests.manifold_tests import manifolds_to_check7 for m in M.interesting_points(): 8 M.belongs(m) 9 v = M.algebra_from_group(m) 10 M.algebra.belongs(v) 11 m2 = M.group_from_algebra(v) 12 M.assert_close(m, m2)13 #printm('Checked %s' % M, m)17 algebra = M.get_algebra() 18 for a in algebra.interesting_points(): 19 #printm('Checked %s' % M, a) 20 M.algebra.belongs(a) 21 g = M.group_from_algebra(a) 22 M.belongs(g)2326 algebra = M.get_algebra() 27 expected = (algebra.get_dimension(),) 28 for p in M.interesting_points(): 29 M.belongs(p) 30 # convert point to algebra 31 a = M.algebra_from_group(p) 32 algebra.belongs(a) 33 # convert algebra to vector 34 v = algebra.vector_from_algebra(a) 35 36 if v.shape != expected: 37 raise ValueError('%s: expected %s, got %s ' % 38 (algebra, expected, v.shape)) 39 40 # Now back to algebra 41 a2 = algebra.algebra_from_vector(v) 42 algebra.belongs(a2) 43 algebra.assert_close(a, a2)4447 algebra = M.get_algebra() 48 points = list(algebra.interesting_points()) 49 if not points: 50 raise ValueError('No test points for algebra of %s.' % M)5155 ftests = [ 56 check_matrix_group_1, 57 check_matrix_group_2, 58 check_matrix_group_vector_isomorphism, 59 check_enough_points_for_algebra 60 ] 61 for a in manifolds_to_check(): 62 if isinstance(a, MatrixLieGroup): 63 for f in ftests: 64 yield f, a65
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Feb 22 20:39:24 2012 | http://epydoc.sourceforge.net |