| Hosted by CoCalc | Download
import snappy
M = snappy.Manifold("m004") M
m004(0,0)
help(snappy)
Help on package snappy: NAME snappy FILE /usr/local/sage/sage-6.5/local/lib/python2.7/site-packages/snappy/__init__.py DESCRIPTION #from __future__ import print_function # import the SnapPy bindings #import logging #logging.basicConfig(filename='example.log',level=logging.DEBUG) #logging.debug('This message should go to the log file') PACKAGE CONTENTS CyOpenGL SnapPy SnapPyHP app app_menus browser database db_utilities filedialog horoviewer infodialog manifolds (package) number phone_home polyviewer preferences ptolemy (package) sage_helper snap (package) test theme tkterminal twister (package) verify (package) version CLASSES SnapPy.CCuspNeighborhood(__builtin__.object) SnapPy.CuspNeighborhood SnapPy.CDirichletDomain(__builtin__.object) SnapPy.DirichletDomain SnapPy.CFundamentalGroup(__builtin__.object) SnapPy.FundamentalGroup(SnapPy.CFundamentalGroup, sage.structure.sage_object.SageObject) SnapPy.CHolonomyGroup(SnapPy.CFundamentalGroup) SnapPy.HolonomyGroup(SnapPy.CHolonomyGroup, sage.structure.sage_object.SageObject) SnapPy.KnotExteriors(SnapPy.Census) SnapPy.AlternatingKnotExteriors SnapPy.NonalternatingKnotExteriors SnapPy.Manifold(SnapPy.Triangulation) Manifold SnapPy.Triangulation(__builtin__.object) Triangulation SnapPyHP.CCuspNeighborhood(__builtin__.object) SnapPyHP.CuspNeighborhood SnapPyHP.CDirichletDomain(__builtin__.object) SnapPyHP.DirichletDomain SnapPyHP.CHolonomyGroup(SnapPyHP.CFundamentalGroup) SnapPyHP.HolonomyGroup(SnapPyHP.CHolonomyGroup, sage.structure.sage_object.SageObject) SnapPyHP.Manifold(SnapPyHP.Triangulation) ManifoldHP __builtin__.object SnapPy.AbelianGroup SnapPy.SymmetryGroup spherogram.codecs.DT.DTcodec spherogram.links.links_base.Crossing spherogram.links.links_base.Strand spherogram.links.tangles.Tangle spherogram.links.tangles.IdentityBraid spherogram.links.tangles.InfinityTangle spherogram.links.tangles.RationalTangle spherogram.links.tangles.ZeroTangle exceptions.Exception(exceptions.BaseException) SnapPy.SnapPeaFatalError sage.structure.sage_object.SageObject(__builtin__.object) SnapPy.FundamentalGroup(SnapPy.CFundamentalGroup, sage.structure.sage_object.SageObject) SnapPy.HolonomyGroup(SnapPy.CHolonomyGroup, sage.structure.sage_object.SageObject) SnapPyHP.HolonomyGroup(SnapPyHP.CHolonomyGroup, sage.structure.sage_object.SageObject) spherogram.links.links_base.Link(__builtin__.object) spherogram.links.invariants.Link class AbelianGroup(__builtin__.object) | An AbelianGroup object represents a finitely generated abelian group, | usually the first homology group of a snappy Manifold. | | Instantiate as AbelianGroup(P) where P is a presentation matrix | given as a list of lists of integers. Alternatively, use | AbelianGroup(elementary_divisors=[n_1, n_2, ... ]) where the n_i | are the elementary divisors of the group. | | >>> AbelianGroup([[1,3,2],[2,0,6]]) | Z/2 + Z | >>> A = AbelianGroup(elementary_divisors=[5,15,0,0]) | >>> A | Z/5 + Z/15 + Z + Z | >>> A[1] | 15 | >>> A.betti_number() | 2 | >>> A.order() | 'infinite' | >>> len(A) | 4 | | Methods defined here: | | __call__(...) | x.__call__(...) <==> x(...) | | __eq__(...) | x.__eq__(y) <==> x==y | | __ge__(...) | x.__ge__(y) <==> x>=y | | __getitem__(...) | x.__getitem__(y) <==> x[y] | | __gt__(...) | x.__gt__(y) <==> x>y | | __init__(...) | x.__init__(...) initializes x; see help(type(x)) for signature | | __le__(...) | x.__le__(y) <==> x<=y | | __len__(...) | x.__len__() <==> len(x) | | __lt__(...) | x.__lt__(y) <==> x<y | | __ne__(...) | x.__ne__(y) <==> x!=y | | __repr__(...) | x.__repr__() <==> repr(x) | | betti_number(...) | The rank of the maximal free abelian subgroup. | | elementary_divisors(...) | The elementary_divisors of this finitely generated abelian group. | | order(...) | The order of the group. Returns the string 'infinite' if the | group is infinite. | | rank(...) | The rank of the group. | | ---------------------------------------------------------------------- | Data descriptors defined here: | | coefficients | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __new__ = <built-in method __new__ of type object> | T.__new__(S, ...) -> a new object with type S, a subtype of T class AlternatingKnotExteriors(KnotExteriors) | Iterator/Sequence for Alternating knot exteriors from the | Hoste-Thistlethwaite tables. Goes through 16 crossings. | | Method resolution order: | AlternatingKnotExteriors | KnotExteriors | Census | | Data and other attributes defined here: | | __qualname__ = 'AlternatingKnotExteriors' | | ---------------------------------------------------------------------- | Methods inherited from KnotExteriors: | | __getitem__(...) | | __init__(...) | | ---------------------------------------------------------------------- | Data and other attributes inherited from KnotExteriors: | | alternation = 'a' | | length = 491327 | | ---------------------------------------------------------------------- | Methods inherited from Census: | | __contains__(...) | | __iter__(...) | | __len__(...) | | __next__ = next(...) | | next(...) class Crossing(__builtin__.object) | See "doc.pdf" for the conventions. The sign of a crossing can be in {0, | +1, -1}. In the first case, the strands at the crossings can have | any orientations, but crossings with sign +/-1 must be oriented as | shown in "doc.pdf". | | Roles of some of the other attributes: | | * label: Arbitrary name used for printing the crossing. | | * directions: store the orientations of the link components passing | through the crossing. For a +1 crossing this is { (0, 2), (3, 1) }. | Set with calls to make_tail. | | * adjacent: The other Crossings that this Crossing is attached to. | | * strand_labels: Numbering of the strands, used for DT codes and | such. | | * strand_components: Which element of the parent | Link.link_components each input's strand belongs to. | | Methods defined here: | | DT_info(self) | | __getitem__(self, i) | | __init__(self, label=None) | | __repr__(self) | | __setitem__(self, i, other) | | crossing_strands(self) | | entry_points(self) | | info(self) | | make_tail(self, a) | Orients the strand joining input "a" to input" a+2" to start at "a" and end at | "a+2". | | orient(self) | | peer_info(self) | | rotate(self, s) | Rotate the incoming connections by 90*s degrees anticlockwise. | | rotate_by_180(self) | Effective reverses directions of the strands | | rotate_by_90(self) | Effectively switches the crossing | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) class CuspNeighborhood(CCuspNeighborhood) | A CuspNeighborhood object represents an equivariant collection of | disjoint horoballs that project to cusp neighborhoods. | | Instantiate as M.cusp_neighborhood() | | Method resolution order: | CuspNeighborhood | CCuspNeighborhood | __builtin__.object | | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __qualname__ = 'CuspNeighborhood' | | ---------------------------------------------------------------------- | Methods inherited from CCuspNeighborhood: | | Ford_domain(...) | Return a list of pairs of complex numbers describing the | endpoints of the segments obtained by projecting the edges of | the Ford domain to the xy-plane in the upper half space model. | | If the high_precision flag is set to False (the default), the | coordinates are Python complex numbers. Otherwise they are | SnapPy Numbers. | | __repr__(...) | x.__repr__() <==> repr(x) | | check_index(...) | Raises an IndexError if the cusp index is invalid. | | get_displacement(...) | Return the displacement of the horospherical boundary of the | specified cusp. The displacement is the hyperbolic distance | that the horospherical boundary has been displaced from its | "home" position, at which the area of the boundary is | 3sqrt(3)/8. (The translates of all of the horospheres are | guaranteed to be pairwise disjoint when each cusp has | displacement 0.) | | get_tie(...) | Return True if the specified cusp is a member of the tied group. | The displacements of the tied cusps are all the same. | | horoballs(...) | Return a list of dictionaries describing the horoballs with | height at least cutoff. The keys are 'center', 'radius', 'index'. | | If the high_precision flag is set to the default value False, these | are Python complexes and floats. Otherwise they are SnapPy Numbers. | | manifold(...) | Return a Manifold built from the current canonical triangulation. | | max_reach(...) | Return the maximum reach over all cusps. | | num_cusps(...) | Return the number of cusps. | | original_index(...) | Returns the index by which the Manifold identifies this cusp. | | reach(...) | Return the displacement at which the specified cusp | neighborhood bumps into itself. (This is twice the | distance between nearest horoball lifts.) | | set_displacement(...) | Set the displacement of the specified cusp. | | set_tie(...) | Mark the specified cusp as a member of the tied group. | | stopper(...) | Return the index of the cusp which will be the first one that | the specified cusp neighborhood bumps into. | (Assumes the other displacements are fixed.) | | stopping_displacement(...) | Return the displacement at which the specified cusp | neighborhood bumps into itself or another cusp neighborhood. | (Assumes the other displacements are fixed.) | | topology(...) | Return the topological type of the specified cusp. | | translations(...) | Return the (complex) Euclidean translations of the meridian | and longitude of the specified cusp. | | triangulation(...) | Return a list of dictionaries describing the endpoints of the | segments obtained by projecting the edges of the triangulation | dual to the Ford domain into the xy-plane in the upper half | space model. The keys are 'endpoints' and 'indices'. | | use_field_conversion(...) | | view(...) | Create a 3D picture of the horoball packing. One can specify | which cusp to put at infinity and how large of horoballs to | look at, e.g. | | >>> M = Manifold('m125') | >>> C = M.cusp_neighborhood() | >>> C.view(which_cusp = 1, cutoff=0.2) #doctest: +CYOPENGL | | volume(...) | Return the volume of the horoball neighborhood of the specified | cusp. | | ---------------------------------------------------------------------- | Data and other attributes inherited from CCuspNeighborhood: | | __new__ = <built-in method __new__ of type object> | T.__new__(S, ...) -> a new object with type S, a subtype of T CuspNeighborhoodHP = class CuspNeighborhood(CCuspNeighborhood) | A CuspNeighborhood object represents an equivariant collection of | disjoint horoballs that project to cusp neighborhoods. | | Instantiate as M.cusp_neighborhood() | | Method resolution order: | CuspNeighborhood | CCuspNeighborhood | __builtin__.object | | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __qualname__ = 'CuspNeighborhood' | | ---------------------------------------------------------------------- | Methods inherited from CCuspNeighborhood: | | Ford_domain(...) | Return a list of pairs of complex numbers describing the | endpoints of the segments obtained by projecting the edges of | the Ford domain to the xy-plane in the upper half space model. | | If the high_precision flag is set to False (the default), the | coordinates are Python complex numbers. Otherwise they are | SnapPy Numbers. | | __repr__(...) | x.__repr__() <==> repr(x) | | check_index(...) | Raises an IndexError if the cusp index is invalid. | | get_displacement(...) | Return the displacement of the horospherical boundary of the | specified cusp. The displacement is the hyperbolic distance | that the horospherical boundary has been displaced from its | "home" position, at which the area of the boundary is | 3sqrt(3)/8. (The translates of all of the horospheres are | guaranteed to be pairwise disjoint when each cusp has | displacement 0.) | | get_tie(...) | Return True if the specified cusp is a member of the tied group. | The displacements of the tied cusps are all the same. | | horoballs(...) | Return a list of dictionaries describing the horoballs with | height at least cutoff. The keys are 'center', 'radius', 'index'. | | If the high_precision flag is set to the default value False, these | are Python complexes and floats. Otherwise they are SnapPy Numbers. | | manifold(...) | Return a Manifold built from the current canonical triangulation. | | max_reach(...) | Return the maximum reach over all cusps. | | num_cusps(...) | Return the number of cusps. | | original_index(...) | Returns the index by which the Manifold identifies this cusp. | | reach(...) | Return the displacement at which the specified cusp | neighborhood bumps into itself. (This is twice the | distance between nearest horoball lifts.) | | set_displacement(...) | Set the displacement of the specified cusp. | | set_tie(...) | Mark the specified cusp as a member of the tied group. | | stopper(...) | Return the index of the cusp which will be the first one that | the specified cusp neighborhood bumps into. | (Assumes the other displacements are fixed.) | | stopping_displacement(...) | Return the displacement at which the specified cusp | neighborhood bumps into itself or another cusp neighborhood. | (Assumes the other displacements are fixed.) | | topology(...) | Return the topological type of the specified cusp. | | translations(...) | Return the (complex) Euclidean translations of the meridian | and longitude of the specified cusp. | | triangulation(...) | Return a list of dictionaries describing the endpoints of the | segments obtained by projecting the edges of the triangulation | dual to the Ford domain into the xy-plane in the upper half | space model. The keys are 'endpoints' and 'indices'. | | use_field_conversion(...) | | view(...) | Create a 3D picture of the horoball packing. One can specify | which cusp to put at infinity and how large of horoballs to | look at, e.g. | | >>> M = Manifold('m125') | >>> C = M.cusp_neighborhood() | >>> C.view(which_cusp = 1, cutoff=0.2) #doctest: +CYOPENGL | | volume(...) | Return the volume of the horoball neighborhood of the specified | cusp. | | ---------------------------------------------------------------------- | Data and other attributes inherited from CCuspNeighborhood: | | __new__ = <built-in method __new__ of type object> | T.__new__(S, ...) -> a new object with type S, a subtype of T class DTcodec(__builtin__.object) | Codec for DT codes of a link projection. | | Methods defined here: | | KLPProjection(self) | Constructs a python simulation of a SnapPea KLPProjection | (Kernel Link Projection) structure. See DTFatGraph.KLP_dict | and Jeff Weeks' SnapPea file link_projection.h for | definitions. Here the KLPCrossings are modeled by | dictionaries. | | PD_code(self, KnotTheory=False) | Return a PD code for the projection described by this DT code, | as a list of lists of 4 integers. If KnotTheory is set to | True, return a string that can be used as input to the Knot | Theory package. | | >>> d = DTcodec([(-6,-8,-2,-4)], [0,1,1,0]) | >>> sorted(d.PD_code()) | [(2, 8, 3, 7), (4, 1, 5, 2), (6, 4, 7, 3), (8, 5, 1, 6)] | | __getitem__(self, n) | A DTcodec can look up a vertex by either of its labels. | | __init__(self, input, flips=None) | | convert_alpha(self, code) | | decode(self, dt, flips=None) | Accepts input of the following types: | 1) a dt code in either numeric or alphabetical form and a sequence | of boolean values, one for each successive label in the DT code, | indicating whether the crossing with that label needs to be | flipped. Alphabetical DT codes can also specify signs by appending | a period followed by a sequence of 0's and 1's. | 2) a DT code with flips set to None. In this case the flips are | computed. | 3) a bytes object containing a compact signed DT code. The | signed DT code may be provided as a byte string, for which | the last byte has bit 7 set, as produced by the signed_DT method. | Alternatives, it can be hex encoded as a string | beginning with '0x', as produced by the hex_signed_DT method. | | This method constructs a planar FatGraph from its input data. | | do_flips(self, v, v_edge, w, w_edge) | Decide whether v and/or w needs to be flipped in order to add | an arc from v to w starting with the v_edge and ending with | the w_edge. If flips are needed, make them. If the embedding | cannot be extended raise an exception. | | embed(self, edge=None) | Try to flip crossings in the FatGraph until it becomes planar. | | embed_arc(self) | | encode(self, header=True, alphabetical=True, flips=True) | Returns a string describing the DT code. Options control | whether to include the 'DT:' header, whether to use the | numerical or alphabetical format, and whether to use the | extended form, which adds flip information for each crossing. | | >>> from snappy import Manifold | >>> d = DTcodec([(-6,-8,-2,-4)]) | >>> A = d.encode() | >>> A in ['DT:dadCDAB.0110', 'DT:dadCDAB.1001'] | True | >>> N = d.encode(alphabetical=False) | >>> N in ['DT:[(-6,-8,-2,-4)], [0,1,1,0]', | ... 'DT:[(-6,-8,-2,-4)], [1,0,0,1]'] | True | >>> M = Manifold(d.encode()) | >>> M.volume() | 2.02988321 | >>> d.encode(flips=False) | 'DT:dadCDAB' | >>> M = Manifold(d.encode(flips=False)) | >>> M.volume() | 2.02988321 | >>> d.encode(alphabetical=False, flips=False) | 'DT:[(-6,-8,-2,-4)]' | | exterior = _link_exterior(self, with_hyperbolic_stucture=True) | The exterior or complement of the link L, that is, S^3 minus L. | | >>> K = Link('4_1') | >>> M = K.exterior() | >>> M.volume() | 2.02988321 | | find_circle(self, first_edge) | Follow a component, starting at the given (directed) edge, | until the first time it crosses itself. Throw away the tail | to get a cycle. Return the list of vertices and the list of | edges traversed by the cycle. | | get_incomplete_vertex(self) | Return a vertex with some marked and some unmarked edges. | If there are any, return a vertex with marked valence 3. | | hex_signed_DT(self) | Return the hex encoding of the signed DT byte sequence. | | >>> d = DTcodec([(-6,-8,-2,-4)]) | >>> d2 = DTcodec(d.hex_signed_DT()) | >>> d2.code | [(-6, -8, -2, -4)] | | link(self) | | signed_DT(self) | Return a byte sequence containing the signed DT code. | | >>> d = DTcodec([(-6,-8,-2,-4)]) | >>> d2 = DTcodec(d.signed_DT()) | >>> d2.code | [(-6, -8, -2, -4)] | | unpack_signed_DT(self, signed_dt) | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) class DirichletDomain(CDirichletDomain) | A DirichletDomain object represents a Dirichlet Domain of | a hyperbolic manifold, typically centered at a point which | is a local maximum of injectivity radius. It will have ideal | vertices if the manifold is not closed. | | Instantiate as M.dirichlet_domain() where M is a Manifold to | obtain a Dirichlet Domain centered at a point which maximizes | injectivity radius. | | Other options can be provided to customize the computation, with | the default values shown here | | >>> M = Manifold('m003(3,-4)') | >>> M.dirichlet_domain(vertex_epsilon=10.0**-8, displacement = [0.0, 0.0, 0.0], centroid_at_origin=True, maximize_injectivity_radius=True) | 40 finite vertices, 0 ideal vertices; 60 edges; 22 faces | | You can also create a Dirichlet Domain from a file listing matrix | generators for the group, in SnapPea's "% Generator" format, via | | D = DirichletDomain(generator_file='test.gens') | | Method resolution order: | DirichletDomain | CDirichletDomain | __builtin__.object | | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __qualname__ = 'DirichletDomain' | | ---------------------------------------------------------------------- | Methods inherited from CDirichletDomain: | | __repr__(...) | x.__repr__() <==> repr(x) | | face_list(...) | Return a list of faces, each represented as a dictionary with | keys 'vertices', 'distance', 'closest', 'hue'. The distance | from the origin is the value for 'distance', and the value for | 'closest' is the orthogonal projection of the origin to the | plane containing the face. The vertices of each face are | listed in clockwise order, as viewed from outside the | polyhedron. | | in_radius(...) | Return the radius of the largest inscribed sphere. | | length_spectrum_dicts(...) | Return a list of info objects describing the short | geodesics up to the specified cutoff length. The keys are | 'length', 'parity', 'topology', and 'multiplicity'. The | length is the complex length; the parity specifies whether | orientation is preserved; and topology distinguishes between | circles and mirrored intervals. | | manifold(...) | Returns a Manifold computed directly from the Dirichlet | domain, regarded as polyhedron with faces identified in pairs. | Only works if this gives a manifold not an orbifold. | | >>> M = Manifold('7_3') | >>> D = M.dirichlet_domain() | >>> A = D.manifold() | >>> M.is_isometric_to(A) | True | | num_edges(...) | Return the number of edges. | | num_faces(...) | Return the number of faces. | | num_finite_vertices(...) | Return the number of finite (non-ideal) vertices. | | num_ideal_vertices(...) | Return the number of ideal vertices. | | num_vertices(...) | Return the number of vertices. | | out_radius(...) | Return the radius of the smallest circubscribed sphere. | | pairing_matrices(...) | Returns a list of the O31Matrices which pair the faces of | this DirichletDomain. | | >>> M = Manifold('s345') | >>> D = M.dirichlet_domain() | >>> matrices = D.pairing_matrices() | >>> D1 = DirichletDomain(O31_generators=matrices) | >>> N = D1.manifold() | >>> M.is_isometric_to(N) | True | | save(...) | Save the Dirichlet domain as a text file in "% Generators" format. | | triangulation(...) | Returns a Triangulation computed directly from the Dirichlet | domain, regarded as polyhedron with faces identified in pairs. | Only works if this gives a manifold not an orbifold. | | >>> M = Manifold('7_3') | >>> D = M.dirichlet_domain() | >>> B = D.triangulation() | >>> M.is_isometric_to(B.with_hyperbolic_structure()) | True | | use_field_conversion(...) | | vertex_list(...) | Return a list of the coordinates of the vertices. These are | the three space coordinates of a point in the time=1 slice of | Minkowski space. That is to say, these are the coordinates of | the image of the point under projection into the Klein model. | | view(...) | | volume(...) | Returns the approximate volume of the DirichletDomain. | Because matrices in O(3,1) tend to accumulate roundoff error, | it's hard to get a good bound on the accuracy of the computed | volume. Nevertheless, the kernel computes the best value it | can, with the hope that it will aid the user in recognizing | manifolds defined by a set of generators. | | ---------------------------------------------------------------------- | Data and other attributes inherited from CDirichletDomain: | | __new__ = <built-in method __new__ of type object> | T.__new__(S, ...) -> a new object with type S, a subtype of T | | __pyx_vtable__ = <capsule object NULL> DirichletDomainHP = class DirichletDomain(CDirichletDomain) | A DirichletDomain object represents a Dirichlet Domain of | a hyperbolic manifold, typically centered at a point which | is a local maximum of injectivity radius. It will have ideal | vertices if the manifold is not closed. | | Instantiate as M.dirichlet_domain() where M is a Manifold to | obtain a Dirichlet Domain centered at a point which maximizes | injectivity radius. | | Other options can be provided to customize the computation, with | the default values shown here | | >>> M = Manifold('m003(3,-4)') | >>> M.dirichlet_domain(vertex_epsilon=10.0**-8, displacement = [0.0, 0.0, 0.0], centroid_at_origin=True, maximize_injectivity_radius=True) | 40 finite vertices, 0 ideal vertices; 60 edges; 22 faces | | You can also create a Dirichlet Domain from a file listing matrix | generators for the group, in SnapPea's "% Generator" format, via | | D = DirichletDomain(generator_file='test.gens') | | Method resolution order: | DirichletDomain | CDirichletDomain | __builtin__.object | | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __qualname__ = 'DirichletDomain' | | ---------------------------------------------------------------------- | Methods inherited from CDirichletDomain: | | __repr__(...) | x.__repr__() <==> repr(x) | | face_list(...) | Return a list of faces, each represented as a dictionary with | keys 'vertices', 'distance', 'closest', 'hue'. The distance | from the origin is the value for 'distance', and the value for | 'closest' is the orthogonal projection of the origin to the | plane containing the face. The vertices of each face are | listed in clockwise order, as viewed from outside the | polyhedron. | | in_radius(...) | Return the radius of the largest inscribed sphere. | | length_spectrum_dicts(...) | Return a list of info objects describing the short | geodesics up to the specified cutoff length. The keys are | 'length', 'parity', 'topology', and 'multiplicity'. The | length is the complex length; the parity specifies whether | orientation is preserved; and topology distinguishes between | circles and mirrored intervals. | | manifold(...) | Returns a Manifold computed directly from the Dirichlet | domain, regarded as polyhedron with faces identified in pairs. | Only works if this gives a manifold not an orbifold. | | >>> M = Manifold('7_3') | >>> D = M.dirichlet_domain() | >>> A = D.manifold() | >>> M.is_isometric_to(A) | True | | num_edges(...) | Return the number of edges. | | num_faces(...) | Return the number of faces. | | num_finite_vertices(...) | Return the number of finite (non-ideal) vertices. | | num_ideal_vertices(...) | Return the number of ideal vertices. | | num_vertices(...) | Return the number of vertices. | | out_radius(...) | Return the radius of the smallest circubscribed sphere. | | pairing_matrices(...) | Returns a list of the O31Matrices which pair the faces of | this DirichletDomain. | | >>> M = Manifold('s345') | >>> D = M.dirichlet_domain() | >>> matrices = D.pairing_matrices() | >>> D1 = DirichletDomain(O31_generators=matrices) | >>> N = D1.manifold() | >>> M.is_isometric_to(N) | True | | save(...) | Save the Dirichlet domain as a text file in "% Generators" format. | | triangulation(...) | Returns a Triangulation computed directly from the Dirichlet | domain, regarded as polyhedron with faces identified in pairs. | Only works if this gives a manifold not an orbifold. | | >>> M = Manifold('7_3') | >>> D = M.dirichlet_domain() | >>> B = D.triangulation() | >>> M.is_isometric_to(B.with_hyperbolic_structure()) | True | | use_field_conversion(...) | | vertex_list(...) | Return a list of the coordinates of the vertices. These are | the three space coordinates of a point in the time=1 slice of | Minkowski space. That is to say, these are the coordinates of | the image of the point under projection into the Klein model. | | view(...) | | volume(...) | Returns the approximate volume of the DirichletDomain. | Because matrices in O(3,1) tend to accumulate roundoff error, | it's hard to get a good bound on the accuracy of the computed | volume. Nevertheless, the kernel computes the best value it | can, with the hope that it will aid the user in recognizing | manifolds defined by a set of generators. | | ---------------------------------------------------------------------- | Data and other attributes inherited from CDirichletDomain: | | __new__ = <built-in method __new__ of type object> | T.__new__(S, ...) -> a new object with type S, a subtype of T | | __pyx_vtable__ = <capsule object NULL> class FundamentalGroup(CFundamentalGroup, sage.structure.sage_object.SageObject) | A FundamentalGroup represents a presentation of the fundamental | group of a SnapPea Triangulation. Group elements are described as | words in the generators a,b,..., where the inverse of a is denoted | A. Words are represented by Python strings (and the concatenation | operator is named "+", according to Python conventions). | | Instantiate as T.fundamental_group(), where T is a Triangulation. | | Methods: | num_generators() --> number of generators | num_relators() --> number of relators | generators() --> list of generators | relators() --> list of relators | meridian(n) --> word representing the meridian on cusp #n | longitude(n) --> word representing the longitude on cusp #n | | Method resolution order: | FundamentalGroup | CFundamentalGroup | sage.structure.sage_object.SageObject | __builtin__.object | | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __qualname__ = 'FundamentalGroup' | | ---------------------------------------------------------------------- | Methods inherited from CFundamentalGroup: | | __repr__(...) | x.__repr__() <==> repr(x) | | gap_string(...) | Returns a string which will define this group within GAP. | | generators(...) | Return the letters representing the generators in the presentation. | | generators_in_originals(...) | Return the current generators in terms of the original | geometric generators (before simplification). | | If the flag "raw_form" is set to True, it returns a sequence of | instructions for expressing the current generators in terms of | the orignal ones. This is sometimes much more concise, though | the format is somewhat obscure. See the source code of this | function in SnapPy.pyx for details. | | longitude(...) | Returns a word representing a conjugate of the current | longitude for the given cusp. Guaranteed to commute with the | meridian for the same cusp. Note: for Klein bottle cusps, | the longitude must be defined carefully. | | >>> G = Manifold('m004').fundamental_group() | >>> G.longitude(0) | 'aBAbABab' | >>> G.longitude() # shortcut for the above. | 'aBAbABab' | | magma_string(...) | Returns a string which will define this group within MAGMA. | | meridian(...) | Returns a word representing a conjugate of the current | meridian for the given cusp. Guaranteed to commute with the | longitude for the same cusp. | | >>> G = Manifold('m125').fundamental_group() | >>> G.meridian(0) | 'aaba' | >>> G.meridian(-1) # The last cusp | 'baaba' | | num_generators(...) | Return the number of generators for the presentation. | | num_original_generators(...) | Return the number of geometric generators (before simplification). | | num_relators(...) | Return the number of generators for the presentation. | | original_generators(...) | Return the original geometric generators (before | simplification) in terms of the current generators. | | peripheral_curves(...) | Returns a list of meridian-longitude pairs for all cusps. | | >>> G = Manifold('m125').fundamental_group() | >>> G.peripheral_curves() | [('aaba', 'abb'), ('baaba', 'Ba')] | | relators(...) | Return a list of words representing the relators in the presentation. | | If the optional argument verbose_form is True, then the | relator is returned in the form "a*b*a^-1*b^-1" instead of "abAB". | | sage(...) | Returns the corresponding Sage FinitelyPresentedGroup | | ---------------------------------------------------------------------- | Data descriptors inherited from CFundamentalGroup: | | num_cusps | | ---------------------------------------------------------------------- | Data and other attributes inherited from CFundamentalGroup: | | __new__ = <built-in method __new__ of type object> | T.__new__(S, ...) -> a new object with type S, a subtype of T | | __pyx_vtable__ = <capsule object NULL> | | ---------------------------------------------------------------------- | Methods inherited from sage.structure.sage_object.SageObject: | | __hash__(...) | File: sage/structure/sage_object.pyx (starting at line 230) | | category(...) | File: sage/structure/sage_object.pyx (starting at line 400) | | db(...) | File: sage/structure/sage_object.pyx (starting at line 371) | | Dumps self into the Sage database. Use db(name) by itself to | reload. | | The database directory is ``$HOME/.sage/db`` | | dump(...) | File: sage/structure/sage_object.pyx (starting at line 343) | | Same as self.save(filename, compress) | | dumps(...) | File: sage/structure/sage_object.pyx (starting at line 349) | | Dump ``self`` to a string ``s``, which can later be reconstituted | as ``self`` using ``loads(s)``. | | There is an optional boolean argument ``compress`` which defaults to ``True``. | | EXAMPLES:: | | sage: O=SageObject(); O.dumps() | 'x\x9ck`J.NLO\xd5+.)*M.)-\x02\xb2\x80\xdc\xf8\xfc\xa4\xac\xd4\xe4\x12\xae` \xdb\x1f\xc2,d\xd4l,d\xd2\x03\x00\xb7X\x10\xf1' | sage: O.dumps(compress=False) | '\x80\x02csage.structure.sage_object\nSageObject\nq\x01)\x81q\x02.' | | parent(...) | File: sage/structure/sage_object.pyx (starting at line 435) | | Return the type of ``self`` to support the coercion framework. | | EXAMPLES:: | | sage: t = log(sqrt(2) - 1) + log(sqrt(2) + 1); t | log(sqrt(2) + 1) + log(sqrt(2) - 1) | sage: u = t.maxima_methods() | sage: u.parent() | <class 'sage.symbolic.maxima_wrapper.MaximaWrapper'> | | rename(...) | File: sage/structure/sage_object.pyx (starting at line 47) | | Change self so it prints as x, where x is a string. | | .. NOTE:: | | This is *only* supported for Python classes that derive | from SageObject. | | EXAMPLES:: | | sage: x = PolynomialRing(QQ, 'x', sparse=True).gen() | sage: g = x^3 + x - 5 | sage: g | x^3 + x - 5 | sage: g.rename('a polynomial') | sage: g | a polynomial | sage: g + x | x^3 + 2*x - 5 | sage: h = g^100 | sage: str(h)[:20] | 'x^300 + 100*x^298 - ' | sage: h.rename('x^300 + ...') | sage: h | x^300 + ... | | Real numbers are not Python classes, so rename is not supported:: | | sage: a = 3.14 | sage: type(a) | <type 'sage.rings.real_mpfr.RealLiteral'> | sage: a.rename('pi') | Traceback (most recent call last): | ... | NotImplementedError: object does not support renaming: 3.14000000000000 | | .. NOTE:: | | The reason C-extension types are not supported by default | is if they were then every single one would have to carry | around an extra attribute, which would be slower and waste | a lot of memory. | | To support them for a specific class, add a | ``cdef public __custom_name`` attribute. | | reset_name(...) | File: sage/structure/sage_object.pyx (starting at line 104) | | Remove the custrom name of an object. | | EXAMPLES:: | | sage: P.<x> = QQ[] | sage: P | Univariate Polynomial Ring in x over Rational Field | sage: P.rename('A polynomial ring') | sage: P | A polynomial ring | sage: P.reset_name() | sage: P | Univariate Polynomial Ring in x over Rational Field | | save(...) | File: sage/structure/sage_object.pyx (starting at line 320) | | Save self to the given filename. | | EXAMPLES:: | | sage: f = x^3 + 5 | sage: f.save(os.path.join(SAGE_TMP, 'file')) | sage: load(os.path.join(SAGE_TMP, 'file.sobj')) | x^3 + 5 | | version(...) | File: sage/structure/sage_object.pyx (starting at line 303) | | The version of Sage. | | Call this to save the version of Sage in this object. | If you then save and load this object it will know in what | version of Sage it was created. | | This only works on Python classes that derive from SageObject. class HolonomyGroup(CHolonomyGroup, sage.structure.sage_object.SageObject) | A HolonomyGroup is a FundamentalGroup with added structure | consisting of a holonomy representation into O(3,1), and an | arbitrarily chosen lift of the holonomy representation to SL(2,C). | The holonomy is determined by the shapes of the tetrahedra, so a | HolonomyGroup is associated to a Manifold, while a Triangulation | only has a FundamentalGroup. Methods are provided to evaluate the | representations on a group element. | | A FundamentalGroup represents a presentation of the fundamental | group of a SnapPea Triangulation. Group elements are described as | words in the generators a,b,..., where the inverse of a is denoted | A. Words are represented by python strings (and the concatenation | operator is named '+', according to Python conventions). | | Instantiate via M.fundamental_group(), where M is a Manifold. | | Method resolution order: | HolonomyGroup | CHolonomyGroup | CFundamentalGroup | sage.structure.sage_object.SageObject | __builtin__.object | | Class methods defined here: | | use_field_conversion(...) from __builtin__.type | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __qualname__ = 'HolonomyGroup' | | ---------------------------------------------------------------------- | Methods inherited from CHolonomyGroup: | | O31(...) | Return the image of the element represented by the input word | under the holonomy representation, where Isom(H^3) is | identified with SO(3,1). | | SL2C(...) | Return the image of the element represented by the input word | under some SL(2,C) representation that lifts the holonomy | representation. Note: the choice of lift is not guaranteed to | vary continuously when filling coefficients are changed. | | complex_length(...) | Return the complex length of the isometry represented by the | input word. | | ---------------------------------------------------------------------- | Data and other attributes inherited from CHolonomyGroup: | | __new__ = <built-in method __new__ of type object> | T.__new__(S, ...) -> a new object with type S, a subtype of T | | __pyx_vtable__ = <capsule object NULL> | | ---------------------------------------------------------------------- | Methods inherited from CFundamentalGroup: | | __repr__(...) | x.__repr__() <==> repr(x) | | gap_string(...) | Returns a string which will define this group within GAP. | | generators(...) | Return the letters representing the generators in the presentation. | | generators_in_originals(...) | Return the current generators in terms of the original | geometric generators (before simplification). | | If the flag "raw_form" is set to True, it returns a sequence of | instructions for expressing the current generators in terms of | the orignal ones. This is sometimes much more concise, though | the format is somewhat obscure. See the source code of this | function in SnapPy.pyx for details. | | longitude(...) | Returns a word representing a conjugate of the current | longitude for the given cusp. Guaranteed to commute with the | meridian for the same cusp. Note: for Klein bottle cusps, | the longitude must be defined carefully. | | >>> G = Manifold('m004').fundamental_group() | >>> G.longitude(0) | 'aBAbABab' | >>> G.longitude() # shortcut for the above. | 'aBAbABab' | | magma_string(...) | Returns a string which will define this group within MAGMA. | | meridian(...) | Returns a word representing a conjugate of the current | meridian for the given cusp. Guaranteed to commute with the | longitude for the same cusp. | | >>> G = Manifold('m125').fundamental_group() | >>> G.meridian(0) | 'aaba' | >>> G.meridian(-1) # The last cusp | 'baaba' | | num_generators(...) | Return the number of generators for the presentation. | | num_original_generators(...) | Return the number of geometric generators (before simplification). | | num_relators(...) | Return the number of generators for the presentation. | | original_generators(...) | Return the original geometric generators (before | simplification) in terms of the current generators. | | peripheral_curves(...) | Returns a list of meridian-longitude pairs for all cusps. | | >>> G = Manifold('m125').fundamental_group() | >>> G.peripheral_curves() | [('aaba', 'abb'), ('baaba', 'Ba')] | | relators(...) | Return a list of words representing the relators in the presentation. | | If the optional argument verbose_form is True, then the | relator is returned in the form "a*b*a^-1*b^-1" instead of "abAB". | | sage(...) | Returns the corresponding Sage FinitelyPresentedGroup | | ---------------------------------------------------------------------- | Data descriptors inherited from CFundamentalGroup: | | num_cusps | | ---------------------------------------------------------------------- | Methods inherited from sage.structure.sage_object.SageObject: | | __hash__(...) | File: sage/structure/sage_object.pyx (starting at line 230) | | category(...) | File: sage/structure/sage_object.pyx (starting at line 400) | | db(...) | File: sage/structure/sage_object.pyx (starting at line 371) | | Dumps self into the Sage database. Use db(name) by itself to | reload. | | The database directory is ``$HOME/.sage/db`` | | dump(...) | File: sage/structure/sage_object.pyx (starting at line 343) | | Same as self.save(filename, compress) | | dumps(...) | File: sage/structure/sage_object.pyx (starting at line 349) | | Dump ``self`` to a string ``s``, which can later be reconstituted | as ``self`` using ``loads(s)``. | | There is an optional boolean argument ``compress`` which defaults to ``True``. | | EXAMPLES:: | | sage: O=SageObject(); O.dumps() | 'x\x9ck`J.NLO\xd5+.)*M.)-\x02\xb2\x80\xdc\xf8\xfc\xa4\xac\xd4\xe4\x12\xae` \xdb\x1f\xc2,d\xd4l,d\xd2\x03\x00\xb7X\x10\xf1' | sage: O.dumps(compress=False) | '\x80\x02csage.structure.sage_object\nSageObject\nq\x01)\x81q\x02.' | | parent(...) | File: sage/structure/sage_object.pyx (starting at line 435) | | Return the type of ``self`` to support the coercion framework. | | EXAMPLES:: | | sage: t = log(sqrt(2) - 1) + log(sqrt(2) + 1); t | log(sqrt(2) + 1) + log(sqrt(2) - 1) | sage: u = t.maxima_methods() | sage: u.parent() | <class 'sage.symbolic.maxima_wrapper.MaximaWrapper'> | | rename(...) | File: sage/structure/sage_object.pyx (starting at line 47) | | Change self so it prints as x, where x is a string. | | .. NOTE:: | | This is *only* supported for Python classes that derive | from SageObject. | | EXAMPLES:: | | sage: x = PolynomialRing(QQ, 'x', sparse=True).gen() | sage: g = x^3 + x - 5 | sage: g | x^3 + x - 5 | sage: g.rename('a polynomial') | sage: g | a polynomial | sage: g + x | x^3 + 2*x - 5 | sage: h = g^100 | sage: str(h)[:20] | 'x^300 + 100*x^298 - ' | sage: h.rename('x^300 + ...') | sage: h | x^300 + ... | | Real numbers are not Python classes, so rename is not supported:: | | sage: a = 3.14 | sage: type(a) | <type 'sage.rings.real_mpfr.RealLiteral'> | sage: a.rename('pi') | Traceback (most recent call last): | ... | NotImplementedError: object does not support renaming: 3.14000000000000 | | .. NOTE:: | | The reason C-extension types are not supported by default | is if they were then every single one would have to carry | around an extra attribute, which would be slower and waste | a lot of memory. | | To support them for a specific class, add a | ``cdef public __custom_name`` attribute. | | reset_name(...) | File: sage/structure/sage_object.pyx (starting at line 104) | | Remove the custrom name of an object. | | EXAMPLES:: | | sage: P.<x> = QQ[] | sage: P | Univariate Polynomial Ring in x over Rational Field | sage: P.rename('A polynomial ring') | sage: P | A polynomial ring | sage: P.reset_name() | sage: P | Univariate Polynomial Ring in x over Rational Field | | save(...) | File: sage/structure/sage_object.pyx (starting at line 320) | | Save self to the given filename. | | EXAMPLES:: | | sage: f = x^3 + 5 | sage: f.save(os.path.join(SAGE_TMP, 'file')) | sage: load(os.path.join(SAGE_TMP, 'file.sobj')) | x^3 + 5 | | version(...) | File: sage/structure/sage_object.pyx (starting at line 303) | | The version of Sage. | | Call this to save the version of Sage in this object. | If you then save and load this object it will know in what | version of Sage it was created. | | This only works on Python classes that derive from SageObject. HolonomyGroupHP = class HolonomyGroup(CHolonomyGroup, sage.structure.sage_object.SageObject) | A HolonomyGroup is a FundamentalGroup with added structure | consisting of a holonomy representation into O(3,1), and an | arbitrarily chosen lift of the holonomy representation to SL(2,C). | The holonomy is determined by the shapes of the tetrahedra, so a | HolonomyGroup is associated to a Manifold, while a Triangulation | only has a FundamentalGroup. Methods are provided to evaluate the | representations on a group element. | | A FundamentalGroup represents a presentation of the fundamental | group of a SnapPea Triangulation. Group elements are described as | words in the generators a,b,..., where the inverse of a is denoted | A. Words are represented by python strings (and the concatenation | operator is named '+', according to Python conventions). | | Instantiate via M.fundamental_group(), where M is a Manifold. | | Method resolution order: | HolonomyGroup | CHolonomyGroup | CFundamentalGroup | sage.structure.sage_object.SageObject | __builtin__.object | | Class methods defined here: | | use_field_conversion(...) from __builtin__.type | | ---------------------------------------------------------------------- | Data descriptors defined here: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) | | ---------------------------------------------------------------------- | Data and other attributes defined here: | | __qualname__ = 'HolonomyGroup' | | ---------------------------------------------------------------------- | Methods inherited from CHolonomyGroup: | | O31(...) | Return the image of the element represented by the input word | under the holonomy representation, where Isom(H^3) is | identified with SO(3,1). | | SL2C(...) | Return the image of the element represented by the input word | under some SL(2,C) representation that lifts the holonomy | representation. Note: the choice of lift is not guaranteed to | vary continuously when filling coefficients are changed. | | complex_length(...) | Return the complex length of the isometry represented by the | input word. | | ---------------------------------------------------------------------- | Data and other attributes inherited from CHolonomyGroup: | | __new__ = <built-in method __new__ of type object> | T.__new__(S, ...) -> a new object with type S, a subtype of T | | __pyx_vtable__ = <capsule object NULL> | | ---------------------------------------------------------------------- | Methods inherited from CFundamentalGroup: | | __repr__(...) | x.__repr__() <==> repr(x) | | gap_string(...) | Returns a string which will define this group within GAP. | | generators(...) | Return the letters representing the generators in the presentation. | | generators_in_originals(...) | Return the current generators in terms of the original | geometric generators (before simplification). | | If the flag "raw_form" is set to True, it returns a sequence of | instructions for expressing the current generators in terms of | the orignal ones. This is sometimes much more concise, though | the format is somewhat obscure. See the source code of this | function in SnapPy.pyx for details. | | longitude(...) | Returns a word representing a conjugate of the current | longitude for the given cusp. Guaranteed to commute with the | meridian for the same cusp. Note: for Klein bottle cusps, | the longitude must be defined carefully. | | >>> G = Manifold('m004').fundamental_group() | >>> G.longitude(0) | 'aBAbABab' | >>> G.longitude() # shortcut for the above. | 'aBAbABab' | | magma_string(...) | Returns a string which will define this group within MAGMA. | | meridian(...) | Returns a word representing a conjugate of the current | meridian for the given cusp. Guaranteed to commute with the | longitude for the same cusp. | | >>> G = Manifold('m125').fundamental_group() | >>> G.meridian(0) | 'aaba' | >>> G.meridian(-1) # The last cusp | 'baaba' | | num_generators(...) | Return the number of generators for the presentation. | | num_original_generators(...) | Return the number of geometric generators (before simplification). | | num_relators(...) | Return the number of generators for the presentation. | | original_generators(...) | Return the original geometric generators (before | simplification) in terms of the current generators. | | peripheral_curves(...) | Returns a list of meridian-longitude pairs for all cusps. | | >>> G = Manifold('m125').fundamental_group() | >>> G.peripheral_curves() | [('aaba', 'abb'), ('baaba', 'Ba')] | | relators(...) | Return a list of words representing the relators in the presentation. | | If the optional argument verbose_form is True, then the | relator is returned in the form "a*b*a^-1*b^-1" instead of "abAB". | | sage(...) | Returns the corresponding Sage FinitelyPresentedGroup | | ---------------------------------------------------------------------- | Data descriptors inherited from CFundamentalGroup: | | num_cusps | | ---------------------------------------------------------------------- | Methods inherited from sage.structure.sage_object.SageObject: | | __hash__(...) | File: sage/structure/sage_object.pyx (starting at line 230) | | category(...) | File: sage/structure/sage_object.pyx (starting at line 400) | | db(...) | File: sage/structure/sage_object.pyx (starting at line 371) | | Dumps self into the Sage database. Use db(name) by itself to | reload. | | The database directory is ``$HOME/.sage/db`` | | dump(...) | File: sage/structure/sage_object.pyx (starting at line 343) | | Same as self.save(filename, compress) | | dumps(...) | File: sage/structure/sage_object.pyx (starting at line 349) | | Dump ``self`` to a string ``s``, which can later be reconstituted | as ``self`` using ``loads(s)``. | | There is an optional boolean argument ``compress`` which defaults to ``True``. | | EXAMPLES:: | | sage: O=SageObject(); O.dumps() | 'x\x9ck`J.NLO\xd5+.)*M.)-\x02\xb2\x80\xdc\xf8\xfc\xa4\xac\xd4\xe4\x12\xae` \xdb\x1f\xc2,d\xd4l,d\xd2\x03\x00\xb7X\x10\xf1' | sage: O.dumps(compress=False) | '\x80\x02csage.structure.sage_object\nSageObject\nq\x01)\x81q\x02.' | | parent(...) | File: sage/structure/sage_object.pyx (starting at line 435) | | Return the type of ``self`` to support the coercion framework. | | EXAMPLES:: | | sage: t = log(sqrt(2) - 1) + log(sqrt(2) + 1); t | log(sqrt(2) + 1) + log(sqrt(2) - 1) | sage: u = t.maxima_methods() | sage: u.parent() | <class 'sage.symbolic.maxima_wrapper.MaximaWrapper'> | | rename(...) | File: sage/structure/sage_object.pyx (starting at line 47) | | Change self so it prints as x, where x is a string. | | .. NOTE:: | | This is *only* supported for Python classes that derive | from SageObject. | | EXAMPLES:: | | sage: x = PolynomialRing(QQ, 'x', sparse=True).gen() | sage: g = x^3 + x - 5 | sage: g | x^3 + x - 5 | sage: g.rename('a polynomial') | sage: g | a polynomial | sage: g + x | x^3 + 2*x - 5 | sage: h = g^100 | sage: str(h)[:20] | 'x^300 + 100*x^298 - ' | sage: h.rename('x^300 + ...') | sage: h | x^300 + ... | | Real numbers are not Python classes, so rename is not supported:: | | sage: a = 3.14 | sage: type(a) | <type 'sage.rings.real_mpfr.RealLiteral'> | sage: a.rename('pi') | Traceback (most recent call last): | ... | NotImplementedError: object does not support renaming: 3.14000000000000 | | .. NOTE:: | | The reason C-extension types are not supported by default | is if they were then every single one would have to carry | around an extra attribute, which would be slower and waste | a lot of memory. | | To support them for a specific class, add a | ``cdef public __custom_name`` attribute. | | reset_name(...) | File: sage/structure/sage_object.pyx (starting at line 104) | | Remove the custrom name of an object. | | EXAMPLES:: | | sage: P.<x> = QQ[] | sage: P | Univariate Polynomial Ring in x over Rational Field | sage: P.rename('A polynomial ring') | sage: P | A polynomial ring | sage: P.reset_name() | sage: P | Univariate Polynomial Ring in x over Rational Field | | save(...) | File: sage/structure/sage_object.pyx (starting at line 320) | | Save self to the given filename. | | EXAMPLES:: | | sage: f = x^3 + 5 | sage: f.save(os.path.join(SAGE_TMP, 'file')) | sage: load(os.path.join(SAGE_TMP, 'file.sobj')) | x^3 + 5 | | version(...) | File: sage/structure/sage_object.pyx (starting at line 303) | | The version of Sage. | | Call this to save the version of Sage in this object. | If you then save and load this object it will know in what | version of Sage it was created. | | This only works on Python classes that derive from SageObject. class IdentityBraid(Tangle) | Method resolution order: | IdentityBraid | Tangle | __builtin__.object | | Methods defined here: | | __init__(self, n) | | ---------------------------------------------------------------------- | Methods inherited from Tangle: | | __add__(self, other) | Put self to right of other and fuse inside strands | | __mul__(self, other) | Join with self *above* other, as with braid multiplication | | __neg__(self) | Mirror image of self | | __or__(self, other) | Put self to right if other, no fusing of strands | | __repr__(self) | | braid_closure = denominator_closure(self) | The braid closure picture | | bridge_closure = numerator_closure(self) | The bridge picture closure | | copy(self) | | denominator_closure(self) | The braid closure picture | | invert(self) | Rotate anticlockwise by 90 and take the mirror image | | numerator_closure(self) | The bridge picture closure | | rotate(self, s) | Rotate anticlockwise by s*90 degrees | | ---------------------------------------------------------------------- | Data descriptors inherited from Tangle: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) class InfinityTangle(Tangle) | Method resolution order: | InfinityTangle | Tangle | __builtin__.object | | Methods defined here: | | __init__(self) | | ---------------------------------------------------------------------- | Methods inherited from Tangle: | | __add__(self, other) | Put self to right of other and fuse inside strands | | __mul__(self, other) | Join with self *above* other, as with braid multiplication | | __neg__(self) | Mirror image of self | | __or__(self, other) | Put self to right if other, no fusing of strands | | __repr__(self) | | braid_closure = denominator_closure(self) | The braid closure picture | | bridge_closure = numerator_closure(self) | The bridge picture closure | | copy(self) | | denominator_closure(self) | The braid closure picture | | invert(self) | Rotate anticlockwise by 90 and take the mirror image | | numerator_closure(self) | The bridge picture closure | | rotate(self, s) | Rotate anticlockwise by s*90 degrees | | ---------------------------------------------------------------------- | Data descriptors inherited from Tangle: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) class Link(spherogram.links.links_base.Link) | Links are made from Crossings. The general model is that of the PD | diagrams used in `KnotTheory <http://katlas.org/wiki/Planar_Diagrams>`_. | | See the file "doc.pdf" for the conventions, which can be accessed | via "spherogram.pdf_docs()", and the `Spherogram tutorial | <http://www.math.uic.edu/t3m/SnapPy/spherogram.html>`_ | for some examples of creating links. | | Here are two ways of creating the figure-8 knot, first via a PD code | | >>> K1 = Link([[8,3,1,4],[2,6,3,5],[6,2,7,1],[4,7,5,8]]) | | and by directly gluing up Crossings: | | >>> a, b, c, d = [Crossing(x) for x in 'abcd'] | >>> a[0], a[1], a[2], a[3] = c[1], d[0], b[1], b[0] | >>> b[2], b[3] = d[3], c[2] | >>> c[3], c[0] = d[2], d[1] | >>> K2 = Link([a,b,c,d]) | | Some families of named links are available, such a torus knots | | >>> Link('T(4, 2)') | <Link: 2 comp; 6 cross> | | and if you have SnapPy installed also the Rolfsen and Hoste-Thistlethwaite | tables: | | >>> Link('8_20') | <Link 8_20: 1 comp; 8 cross> | >>> Link('K12a123') | <Link K12a123: 1 comp; 12 cross> | >>> Link('L12n123') | <Link L12n123: 2 comp; 12 cross> | | Method resolution order: | Link | spherogram.links.links_base.Link | __builtin__.object | | Methods defined here: | | __init__(self, crossings, check_planarity=True, build=True) | | alexander_matrix(self, mv=True) | Returns the Alexander matrix of the link:: | | sage: L = Link('3_1') | sage: L.alexander_matrix() | ([ -1 -1/t + 1 1/t] | [ 1/t -1 -1/t + 1] | [-1/t + 1 1/t -1], [t, t, t]) | sage: L = Link([(4,1,3,2),(1,4,2,3)]) | sage: L.alexander_matrix() #doctest: +SKIP | ([ t1 - 1 -t2 + 1] | [-t1 + 1 t2 - 1], [t2, t1]) | | alexander_poly(self, multivar=True, v='no', method='wirt', norm=True) | Calculates the Alexander polynomial of the link. For links with one component, | can evaluate the alexander polynomial at v:: | | sage: K = Link('4_1') | sage: K.alexander_poly() | t + 1/t - 3 | sage: K.alexander_poly(v=[4]) | 5/4 | | sage: K = Link('L7n1') | sage: K.alexander_poly(norm=False) | (t1*t2^3 + 1)/(t1*t2^4) | | black_graph(self) | Returns the black graph of K. If the black graph is disconnected | (which can only happen for a split link diagram), returns one | connected component. The edges are labeled by the crossings | they correspond to. Example:: | | sage: K=Link('5_1') | sage: K.black_graph() | Subgraph of (): Multi-graph on 2 vertices | | determinant(self, method='goeritz') | Returns the determinant of the link, a non-negative integer. | | Possible methods are 'wirt', using the Wirtinger presentation; 'goeritz', | using the Goeritz matrix, and 'color', using the 'colorability matrix', or | anything else, to compute the Alexander polynomial at -1. Example:: | | sage: K = Link( [(4,1,5,2),(6,4,7,3),(8,5,1,6),(2,8,3,7)] ) # Figure 8 knot | sage: K.determinant() | 5 | | exterior = _link_exterior(self, with_hyperbolic_stucture=True) | The exterior or complement of the link L, that is, S^3 minus L. | | >>> K = Link('4_1') | >>> M = K.exterior() | >>> M.volume() | 2.02988321 | | goeritz_matrix(self) | Finds the black graph of a knot, and from that, returns the Goeritz | matrix of that knot:: | | sage: K=Link('4_1') | sage: K.goeritz_matrix().det() | 5 | | jones_poly(self, variable=None) | Returns the Jones polynomial of the link:: | | sage: L = Link('8_5') | sage: L.jones_poly() | q^8 - 2*q^7 + 3*q^6 - 4*q^5 + 3*q^4 - 3*q^3 + 3*q^2 - q + 1 | | knot_group(self) | Computes the knot group using the Wirtinger presentation. | Returns a finitely presented group:: | | sage: K = Link('3_1') | sage: G = K.knot_group() | sage: type(G) | <class 'sage.groups.finitely_presented.FinitelyPresentedGroup_with_category'> | | linking_matrix(self) | Calcluates the linking number for each pair of link components. | Returns a linking matrix, in which the (i,j)th component is the | linking number of the ith and jth link components. | | morse_diagram(self) | Returns a MorseLinkDiagram of this link diagram, that is a choice | of height function which realizes the Morse number:: | | sage: L = Link('L8n2') | sage: D = L.morse_diagram() | sage: D.morse_number == L.morse_number() | True | sage: D.is_bridge() | True | sage: B = D.bridge() | sage: len(B.bohua_code()) | 64 | | morse_number(self, solver='GLPK') | The *Morse number* of a planar link diagram D is | | m(D) = min { # of maxima of h on D } | | where h is a height function on R^2 which is generic on D; alternatively, | this is the minimum number of cups/caps in a `MorseLink presentation | <http://katlas.math.toronto.edu/wiki/MorseLink_Presentations>`_ | of the diagram D. The Morse number is very closely related to the more | traditional bridge number. Examples:: | | sage: K = Link('5_2') | sage: K.morse_number() | 2 | sage: Link('6^3_2').morse_number() | 3 | | signature(self) | Returns the signature of the link. Examples:: | | sage: K = Link('4a1') | sage: K.signature() | 0 | sage: L = Link('9^3_12') | sage: Lbar = L.mirror() | sage: L.signature() + Lbar.signature() | 0 | | view = orthogonal_draw(self, link_editor=None) | Opens a Plink link editor window with displaying the current link. | The strands of the links are unions of edges in the standard | integer grid, following the work of `Tamassia | <http://dx.doi.org/10.1137/0216030>`_ and `Bridgeman | et. al. <ftp://ftp.cs.brown.edu/pub/techreports/99/cs99-04.pdf>`_ | | ---------------------------------------------------------------------- | Methods inherited from spherogram.links.links_base.Link: | | DT_code(self, DT_alpha=False) | The Dowker-Thistlethwaite code for the link in either numerical or | alphabetical form. | | KLPProjection(self) | | PD_code(self, KnotTheory=False, min_strand_index=0) | The planar diagram code for the link. | | __len__(self) | | __repr__(self) | | all_crossings_oriented(self) | | alternating(self) | Returns the alternating link with the same planar graph. No attempt | is made to preserve the order of the link components or ensure | that the DT code of the result has all positive entries (as | opposed to all negative). | | >>> L = Link('L14n12345') | >>> A = L.alternating() | >>> A.exterior().identify() | [L14a5150(0,0)(0,0)] | | backtrack(self, steps=10) | Performs a sequence of Reidemeister moves which increase or maintain | the number of crossings in a diagram. The number of such | moves is the parameter steps. The diagram is modified in place. | | >>> K = Link('L14a7689') | >>> K | <Link L14a7689: 2 comp; 14 cross> | >>> K.backtrack(steps = 50) | >>> len(K.crossings) > 20 | True | | connected_sum(self, other_knot) | Returns the connected sum of two knots. | | >>> K = Link('4_1') | >>> K.connected_sum(K) | <Link: 1 comp; 8 cross> | | copy(self) | Returns a copy of the link. | | >>> K=Link('4_1') | >>> copy=K.copy() | >>> K.PD_code() == copy.PD_code() | True | | If the link is very large (100s of crossings), you may get a | recursion limit exception; to get around this, call e.g. | ``sys.setrecursionlimit(10000)``. | | crossing_entries(self) | | crossing_strands(self) | | deconnect_sum(self, destroy_original=False) | Undoes all connect sums that are diagramatically obvious, | i.e. those where there is a circle which meets the projection | in two points. | | >>> K = Link('5_2') | >>> L = K.connected_sum(K); L | <Link: 1 comp; 10 cross> | >>> L.deconnect_sum() | [<Link: 1 comp; 5 cross>, <Link: 1 comp; 5 cross>] | | digraph(self) | The underlying directed graph for the link diagram. | | dual_graph(self) | The dual graph to a link diagram D, whose vertices correspond to | complementary regions (faces) of D and whose edges are dual to the | edges of D. | | faces(self) | The faces are the complementary regions of the link diagram. Each face | is given as a list of corners of crossings as one goes around | *clockwise*. These corners are recorded as CrossingStrands, | where CrossingStrand(c, j) denotes the corner of the face | abutting crossing c between strand j and j + 1. | | Alternatively, the sequence of CrossingStrands can be regarded | as the *heads* of the oriented edges of the face. | | is_planar(self) | Whether the 4-valent graph underlying the link projection is planar. | Should always be True for any actual Link. | | >>> L = Link('5^2_1') | >>> L.is_planar() | True | >>> c = Crossing() | >>> c[0], c[1] = c[2], c[3] # Punctured torus gluing | >>> bad = Link([c], check_planarity=False) | >>> bad.is_planar() | False | | linking_number(self) | Returns the linking number of self if self has two components; | or the sum of the linking numbers of all pairs of components | in general. | | mirror(self) | Returns the mirror image of the link, preserving link orientations and | component order. | | optimize_overcrossings(self) | Minimizes the number of crossings of a strand which crosses entirely | above the diagram by finding the path crossing over the diagram with | the least number of overcrossings. It begins with the longest | overcrossing, and continues with smaller ones until it successfully | reduces the number of crossings. | | overcrossings(self) | Returns a list of the sequences of overcrossings of the link, | sorted in descending order of length | | peer_code(self) | | pieces(self) | Auxiliary function used by knot_group. Constructs the strands | of the knot from under-crossing to under-crossing. Needed for the | Wirtinger Presentation. | | simplify(self, mode='basic', type_III_limit=100) | Tries to simplify the link projection. Returns whether it succeeded | in reducing the number of crossings. Modifies the link in | place, and unknot components which are also unlinked may be | silently discarded. The ordering of ``link_components`` is not | always preserved. | | The following strategies can be employed. | | 1. In the default ``basic`` mode, it does Reidemeister I and II moves | until none are possible. | | 2. In ``level`` mode, it does random Reidemeister III moves, reducing | the number of crossings via type I and II moves whenever possible. | The process stops when it has done ``type_III_limit`` *consecutive* | type III moves without any simplification. | | 3. In ``pickup`` mode, it also minimizes the number of crossings of | strands which cross entirely above (or below) the diagram by | finding the path crossing over the diagram with the least number of | overcrossings (or undercrossings); this has the effect of doing | "picking up" strands and putting them down elsewhere. | | 4. Finally, the ``global`` mode is the combination of 3 and 4. | | | Some examples: | | >>> K = Link([(13,10,14,11),(11,5,12,4),(3,13,4,12), (9,14,10,1),(1,7,2,6),(2,7,3,8),(5,9,6,8)]) | >>> K | <Link: 1 comp; 7 cross> | >>> K.simplify('basic') | True | >>> K | <Link: 1 comp; 4 cross> | >>> K.simplify('basic') # Already done all it can | False | | >>> L = Link([(5,0,6,1), (14,5,15,4), (10,2,11,3), (7,12,8,11), (17,0,14,9), (12,9,13,8), (3,13,4,10), (1,16,2,15), (16,6,17,7)]) | >>> L | <Link: 3 comp; 9 cross> | >>> L.simplify('basic') | False | >>> L.simplify('level') | True | >>> L # Trivial unlinked component has been discarded! | <Link: 2 comp; 2 cross> | | >>> K = Link('K14n2345') | >>> K.backtrack(30) | >>> K.simplify('global') | True | >>> K | <Link: 1 comp; 14 cross> | | split_link_diagram(self, destroy_original=False) | Breaks the given link diagram into pieces, one for each connected | component of the underlying 4-valent graph. | | >>> L = Link([(2,1,1,2),(4,3,3,4)], check_planarity=False) | >>> L.split_link_diagram() | [<Link: 1 comp; 1 cross>, <Link: 1 comp; 1 cross>] | | sublink(self, components) | Returns the sublink consisting of the specified components; see the | example below for the various accepted forms. | | Warnings: Components in the sublink that are both unknotted | and unlinked may be silently thrown away. The order of the | components in the sublink need not correspond to their order | in the original link. | | >>> L = Link('L14n64110') | >>> L | <Link L14n64110: 5 comp; 14 cross> | >>> L.sublink([1,2,3,4]) | <Link: 4 comp; 10 cross> | >>> comps = L.link_components | >>> L.sublink([comps[0], comps[1]]) | <Link: 2 comp; 2 cross> | | If you just want one component you can do this: | | >>> L = Link('L11a127') | >>> L.sublink(1) | <Link: 1 comp; 7 cross> | >>> L.sublink(L.link_components[0]) | <Link: 0 comp; 0 cross> | | The last answer is because the second component is unknotted | and so thown away. | | writhe(self) | Finds the writhe of a knot. | | >>> K = Link( [(4,1,5,2),(6,4,7,3),(8,5,1,6),(2,8,3,7)] ) # Figure 8 knot | >>> K.writhe() | 0 | | ---------------------------------------------------------------------- | Data descriptors inherited from spherogram.links.links_base.Link: | | __dict__ | dictionary for instance variables (if defined) | | __weakref__ | list of weak references to the object (if defined) class Manifold(SnapPy.Manifold) | A Manifold is a Triangulation together with a geometric structure. | That is, a Manifold is an ideal triangulation of the interior of a | compact 3-manifold with torus boundary, where each tetrahedron has | has been assigned the geometry of an ideal tetrahedron in | hyperbolic 3-space. A Dehn-filling can be specified for each | boundary component, allowing the description of closed 3-manifolds | and some orbifolds. Here's a quick example: | | >>> M = Manifold('9_42') | >>> M.volume() | 4.05686022 | >>> M.cusp_info('shape') | [-4.27893632 + 1.95728680*I] | | A Manifold can be specified in a number of ways, e.g. | | - Manifold('9_42') : The complement of the knot 9_42 in S^3. | - Manifold('m125(1,2)(4,5)') : The SnapPea census manifold m125 | where the first cusp has Dehn filling (1,2) and the second cusp has | filling (4,5). | - Manifold() : Opens a link editor window where can you | specify a link complement. | | In general, the specification can be from among the below, with | information on Dehn fillings added. | | - SnapPea cusped census manifolds: e.g. 'm123', 's123', 'v123'. | | - Link complements: | + Rolfsen's table: e.g. '4_1', '04_1', '5^2_6', '6_4^7', 'L20935', 'l104001'. | + Hoste-Thistlethwaite Knotscape table: e.g. '11a17' or '12n345' | + Callahan-Dean-Weeks-Champanerkar-Kofman-Patterson knots: e.g. 'K6_21'. | + Dowker-Thistlethwaite code: e.g. 'DT:[(6,8,2,4)]' | | - Once-punctured torus bundles: e.g. 'b++LLR', 'b+-llR', 'bo-RRL', 'bn+LRLR' | | - Fibered manifold associated to a braid: 'Braid[1,2,-3,4]' | | Here, the braid is thought of as a mapping class of the | punctured disc, and this manifold is the corresponding | mapping torus. If you want the braid closure, do (1,0) filling | of the last cusp. | | - From mapping class group data using Twister: | | 'Bundle(S_{1,1}, [a0, B1])' or 'Splitting(S_{1,0}, [b1, A0], [a0,B1])' | | See the help for the 'twister' module for more. | | - A SnapPea triangulation or link projection file: 'filename' | | The file will be loaded if found in the current directory or the | path given by the shell variable SNAPPEA_MANIFOLD_DIRECTORY. | | - A string containing the contents of a SnapPea triangulation or link | projection file. | | Method resolution order: | Manifold | SnapPy.Manifold | SnapPy.Triangulation | __builtin__.object | | Methods defined here: | | alexander_polynomial(manifold, **kwargs) | Computes the multivariable Alexander polynomial of the manifold:: | | sage: M = Manifold('K12n123') | sage: M.alexander_polynomial() | 2*a^6 - 14*a^5 + 34*a^4 - 45*a^3 + 34*a^2 - 14*a + 2 | | sage: N = Triangulation('v1539(5,1)') | sage: N.alexander_polynomial() | a^2*b + a*b^2 + a*b + a + b | | Any provided keyword arguments are passed to fundamental_group and | so affect the group presentation used in the computation. | | high_precision(self) | Return a high precision version of this manifold. | >>> M = Manifold('m004') | >>> type(M.high_precision()) | <class 'snappy.ManifoldHP'> | | holonomy_matrix_entries(manifold, fundamental_group_args=[]) | | homological_longitude(manifold, cusp=0) | Returns the peripheral curve in the given cusp, if any, which is | homologically trivial in the manifold:: | | sage: M = Manifold('m015') | sage: M.homological_longitude() | (2, -1) | | The components of the next link have nontrivial linking number | so there is no such curve:: | | sage: W = Manifold('L7a2') | sage: W.homological_longitude(cusp=1) == None | True | | hyperbolic_SLN_torsion(M, N, bits_prec=100) | Compute the torsion polynomial of the holonomy representation lifted | to SL(2, C) and then followed by the irreducible representation | from SL(2, C) -> SL(N, C):: | | sage: M = Manifold('m016') | sage: [M.hyperbolic_SLN_torsion(N).degree() for N in [2, 3, 4]] | [18, 27, 36] | | hyperbolic_adjoint_torsion(M, bits_prec=100) | Computes the torsion polynomial of the adjoint representation | a la Dubois-Yamaguichi. This is not a sign-refined computation | so the result is only defined up to sign, not to mention a power | of the variable 'a':: | | sage: M = Manifold('K11n42') | sage: tau = M.hyperbolic_adjoint_torsion() | sage: tau.parent() | Univariate Polynomial Ring in a over Complex Field with 100 bits of precision | sage: tau.degree() | 7 | | hyperbolic_torsion(M, bits_prec=100, all_lifts=False, wada_conventions=False, phi=None) | Computes the hyperbolic torision polynomial as defined in | `[DFJ] <http://arxiv.org/abs/1108.3045>`_:: | | sage: M = Manifold('K11n42') | sage: M.alexander_polynomial() | 1 | sage: tau = M.hyperbolic_torsion(bits_prec=200) | sage: tau.degree() | 6 | | invariant_trace_field_gens(manifold, fundamental_group_args=[]) | The generators of the trace field as ApproximateAlgebraicNumbers. Can be | used to compute the tetrahedra field, where the first two parameters | are bits of precision and maximum degree of the field:: | | sage: M = Manifold('m007(3,1)') | sage: K = M.invariant_trace_field_gens().find_field(100, 10, optimize=True)[0] | sage: L = M.trace_field_gens().find_field(100, 10, optimize=True)[0] | sage: K.polynomial(), L.polynomial() | (x^2 - x + 1, x^4 - 2*x^3 + x^2 + 6*x + 3) | | low_precision(self) | | normal_boundary_slopes(self, subset='all') | For a one-cusped manifold, returns all the nonempty boundary slopes of | spun normal surfaces. Provided the triangulation supports a | genuine hyperbolic structure, then by `Thurston and Walsh | <http://arxiv.org/abs/math/0503027>`_ any strict boundary slope | (the boundary of an essential surface which is not a fiber or | semifiber) must be listed here. | | >>> M = Manifold('K3_1') | >>> M.normal_boundary_slopes() | [(16, -1), (20, -1), (37, -2)] | | If the ``subset`` flag is set to ``'kabaya'``, then it only | returns boundary slopes associated to vertex surfaces with a quad | in every tetrahedron; by Theorem 1.1. of `[DG] | <http://arxiv.org/abs/1102.4588>`_ these are all strict boundary | slopes. | | >>> N = Manifold('m113') | >>> N.normal_boundary_slopes() | [(1, 1), (1, 2), (2, -1), (2, 3), (8, 11)] | >>> N.normal_boundary_slopes('kabaya') | [(8, 11)] | | If the ``subset`` flag is set to ``'brasile'`` then it returns | only the boundary slopes that are associated to vertex surfaces | giving isolated rays in the space of embedded normal surfaces. | | >>> N.normal_boundary_slopes('brasile') | [(1, 2), (8, 11)] | | normal_surfaces(self) | All the vertex spun-normal surfaces in the current triangulation. | | >>> M = Manifold('m004') | >>> M.normal_surfaces() # doctest: +NORMALIZE_WHITESPACE | [<Surface 0: [0, 0] [1, 2] (4, 1)>, | <Surface 1: [0, 1] [1, 2] (4, -1)>, | <Surface 2: [1, 2] [2, 1] (-4, -1)>, | <Surface 3: [2, 2] [2, 1] (-4, 1)>] | | polished_holonomy(M, bits_prec=100, fundamental_group_args=[], lift_to_SL2=True, ignore_solution_type=False, dec_prec=None) | Return the fundamental group of M equipt with a high-precision version of the | holonomy representation:: | | sage: M = Manifold('m004') | sage: G = M.polished_holonomy() | sage: G('a').trace() | 1.5000000000000000000000000000 - 0.86602540378443864676372317075*I | sage: G = M.polished_holonomy(bits_prec=1000) | sage: G('a').trace().parent() | Complex Field with 1000 bits of precision | | tetrahedra_field_gens(manifold) | The shapes of the tetrahedra as ApproximateAlgebraicNumbers. Can be | used to compute the tetrahedra field, where the first two parameters | are bits of precision and maximum degree of the field:: | | sage: M = Manifold('m015') | sage: tets = M.tetrahedra_field_gens() | sage: tets.find_field(100, 10, optimize=True) # doctest: +NORMALIZE_WHITESPACE | (Number Field in z with defining polynomial x^3 - x - 1, | <ApproxAN: -0.662358978622 - 0.562279512062*I>, [-z, -z, -z]) | | trace_field_gens(manifold, fundamental_group_args=[]) | The generators of the trace field as ApproximateAlgebraicNumbers. Can be | used to compute the tetrahedra field, where the first two parameters | are bits of precision and maximum degree of the field:: | | sage: M = Manifold('m125') | sage: traces = M.trace_field_gens() | sage: traces.find_field(100, 10, optimize=True) # doctest: +NORMALIZE_WHITESPACE | [...]