regina Namespace Reference

Contains the entire Regina calculation engine. More...

Namespaces

namespace  boost
 

Miscellaneous utility classes taken or modified from the Boost C++ libraries.


namespace  i18n
 

Various classes and routines for working with internationalisation and character encodings.


namespace  python
 

Utility classes and routines to assist with Python bindings for the calculation engine.


namespace  stl
 

Miscellaneous utility classes and routines taken or modified from the Standard Template Library.


namespace  xml
 

Various classes and routines for XML manipulation, some taken or modified from the libxml++ library.


Classes

class  NAbelianGroup
 Represents a finitely generated abelian group. More...
struct  NGroupExpressionTerm
 Represents a power of a generator in a group presentation. More...
class  NGroupExpression
 Represents an expression involving generators from a group presentation. More...
class  NGroupPresentation
 Represents a finite presentation of a group. More...
class  NMarkedAbelianGroup
 Represents a finitely generated abelian group given by a chain complex. More...
class  NHomMarkedAbelianGroup
 Represents a homomorphism of finitely generated abelian groups. More...
class  NXMLAbelianGroupReader
 An XML element reader that reads a single abelian group. More...
class  NXMLGroupPresentationReader
 An XML element reader that reads a single group presentation. More...
class  NAngleStructureVector
 A vector of integers used to indirectly store the individual angles in an angle structure. More...
class  NAngleStructure
 Represents an angle structure on a triangulation. More...
class  NAngleStructureList
 A packet representing a collection of angle structures on a triangulation. More...
class  NXMLAngleStructureReader
 An XML element reader that reads a single angle structure. More...
class  NXMLAngleStructureListReader
 An XML packet reader that reads a single angle structure list. More...
class  NCensus
 A utility class used to form a complete census of 3-manifold triangulations satisfying certain constraints. More...
class  NFacePairing
 Represents a specific pairwise matching of tetrahedron faces. More...
class  NGluingPerms
 Represents a specific set of gluing permutations to complement a particular pairwise matching of tetrahedron faces. More...
class  NGluingPermSearcher
 A utility class for searching through all possible gluing permutation sets that correspond to a given face pairing. More...
class  NCompactSearcher
 A gluing permutation search class that offers a specialised search algorithm for when only compact (finite) 3-manifold triangulations are required. More...
class  NClosedPrimeMinSearcher
 A gluing permutation search class that offers a specialised search algorithm for when (i) only closed prime minimal P2-irreducible triangulations are required, and (ii) the given face pairing has order at least three. More...
class  NDoubleDescription
 Implements a modified double description method for polytope vertex enumeration. More...
class  NEnumConstraintList
 Represents an individual validity constraint for use with polytope vertex enumeration. More...
class  NFile
 Represents an old-style binary file containing a packet tree. More...
class  NFileInfo
 Stores information about a Regina data file, including file type and version. More...
class  NFilePropertyReader
 Assists with reading individual object properties from old-style binary data files. More...
class  NGlobalDirs
 Provides global routines that return directories in which various components of Regina are installed on the system. More...
class  NRandomAccessResource
 Provides a standard random access interface for old-style binary file-like resources. More...
class  NLocalFileResource
 A random access resource that is simply a local file. More...
class  NXMLCallback
 Provides the callbacks for an XMLParser required to parse an entire file using a series of NXMLElementReader objects. More...
class  NXMLElementReader
 Used to read the contents of a single XML element. More...
class  NXMLCharsReader
 A reader for an XML element that contains only characters. More...
class  NGraphLoop
 Represents a closed graph manifold formed by joining a single bounded Seifert fibred space to itself along a torus. More...
class  NGraphPair
 Represents a closed graph manifold formed by joining two bounded Seifert fibred spaces along a common torus. More...
class  NGraphTriple
 Represents a closed graph manifold formed by joining three bounded Seifert fibred spaces along their torus boundaries. More...
class  NHandlebody
 Represents an arbitrary handlebody. More...
class  NLensSpace
 Represents a general Lens space. More...
class  NManifold
 Represents a particular 3-manifold. More...
struct  NSFSFibre
 Represents an exceptional (alpha, beta) fibre in a Seifert fibred space. More...
class  NSFSpace
 Represents a general Seifert fibred space, which may be orientable or non-orientable. More...
class  NSFSAltSet
 Provides a variety of alternative representations of a single bounded Seifert fibred space. More...
class  NSimpleSurfaceBundle
 Represents a particularly simple closed surface bundle over the circle. More...
class  NSnapPeaCensusManifold
 Represents a 3-manifold from the SnapPea cusped census. More...
class  NTorusBundle
 Represents a torus bundle over the circle. More...
class  NFastRay
 A fast but inflexible class storing a ray rooted at the origin whose coordinates are rational. More...
class  NFastVector
 A fast but inflexible vector of elements from a given ring T. More...
class  NLargeInteger
 Represents an arbitrary precision integer. More...
class  NMatrix
 Represents a matrix of elements of the given type T. More...
class  NMatrixRing
 Represents a matrix of elements from a given ring T. More...
class  NMatrix2
 Represents a 2-by-2 integer matrix. More...
class  NMatrixInt
 Represents a matrix of arbitrary precision integers. More...
class  NPrimes
 A helper class for finding primes and factorising integers. More...
class  NRational
 Represents an arbitrary precision rational number. More...
class  NRay
 A slow but flexible class storing a ray rooted at the origin whose coordinates are rational. More...
class  NVector
 A slow but flexible vector class of elements from a given ring T. More...
class  NVectorDense
 A dense vector of objects of type T. More...
class  NVectorMatrix_Illegal_Modification
 An exception thrown when a matrix row or column vector is modified. More...
class  NVectorMatrix
 A vector that corresponds to a row or column of a matrix. More...
class  NVectorMatrixRow
 A vector that corresponds to a row of a matrix. More...
class  NVectorMatrixCol
 A vector that corresponds to a column of a matrix. More...
class  NVectorUnit_Illegal_Modification
 An exception thrown when a unit vector is modified. More...
class  NVectorUnit
 A unit vector of type T. More...
class  NContainer
 A packet that simply contains other packets. More...
class  NPacket
 Represents a packet of information that may be individually edited or operated upon. More...
class  NPacketListener
 An object that can be registered to listen for packet events. More...
class  NPDF
 A packet that can hold a PDF document. More...
class  NScript
 A packet representing a script that can be run. More...
class  NText
 A packet representing a text string. More...
class  NXMLPacketReader
 An XML element reader that reads the data for an individual packet. More...
class  NXMLContainerReader
 An XML packet reader that reads a single container. More...
class  NXMLPDFReader
 An XML packet reader that reads a single PDF packet. More...
class  NXMLScriptReader
 An XML packet reader that reads a single script. More...
class  NXMLTextReader
 An XML packet reader that reads a single text packet. More...
class  NProgress
 An object through which external interfaces can obtain progress reports when running long calculations. More...
class  NProgressFinished
 A progress report that immediately claims it is finished. More...
class  NProgressManager
 Manages the sharing of an NProgress object between reading and writing threads. More...
class  NProgressMessage
 A progress report in which the current state of progress is stored as a string message. More...
struct  NProgressStateNumeric
 A simple structure used for passing around a numeric state of progress. More...
class  NProgressNumber
 A progress report in which the current state of progress is stored as a number of items completed. More...
class  ShareableObject
 Facilitates mirroring objects in the underlying C++ calculation engine using the various wrapper classes provided in the various external interfaces (such as the Python interface). More...
class  NSnapPeaTriangulation
 Offers direct access to the SnapPea kernel from within Regina. More...
class  NSigCensus
 A utility class used by formSigCensus(). More...
class  NSigPartialIsomorphism
 Represents a partial isomorphism between two splitting surface signatures. More...
class  NSignature
 Represents a signature of a splitting surface in a closed 3-manifold triangulation. More...
class  NAugTriSolidTorus
 Represents an augmented triangular solid torus component of a triangulation. More...
class  NBlockedSFS
 Represents a blocked Seifert fibred space. More...
class  NBlockedSFSLoop
 Represents a blocked Seifert fibred space with two boundary tori that are joined together. More...
class  NBlockedSFSPair
 Represents a blocked pair of Seifert fibred spaces joined along a single connecting torus. More...
class  NBlockedSFSTriple
 Represents a blocked sequence of three Seifert fibred spaces joined along connecting tori. More...
class  NL31Pillow
 Represents a triangular pillow L(3,1) component of a triangulation. More...
class  NLayeredChain
 Represents a layered chain in a triangulation. More...
class  NLayeredChainPair
 Represents a layered chain pair component of a triangulation. More...
class  NLayeredLensSpace
 Represents a layered lens space component of a triangulation. More...
class  NLayeredLoop
 Represents a layered loop component of a triangulation. More...
class  NLayeredSolidTorus
 Represents a layered solid torus in a triangulation. More...
class  NLayeredTorusBundle
 Describes a layered torus bundle. More...
class  NLayering
 Represents a layering of zero or more tetrahedra upon a torus boundary. More...
class  NPillowTwoSphere
 Represents a 2-sphere made from two faces glued together along their three edges. More...
class  NPluggedTorusBundle
 Describes a triangulation of a graph manifold formed by joining a bounded saturated region with a thin I-bundle over the torus, possibly with layerings in between. More...
class  NPlugTriSolidTorus
 Represents a plugged triangular solid torus component of a triangulation. More...
struct  NSatAnnulus
 Represents an annulus formed from a pair of faces in a Seifert fibred space. More...
class  NSatBlock
 Represents a saturated block in a Seifert fibred space. More...
class  NSatBlockStarter
 Contains a triangulation of a saturated block along with the accompanying saturated block description. More...
class  NSatBlockStarterSet
 Represents a set of starter blocks that can be used for identifying triangulations of Seifert fibred spaces. More...
class  NSatBlockStarterSearcher
 A helper class for locating and using starter blocks within a triangulation. More...
class  NSatMobius
 A degenerate zero-tetrahedron saturated block that corresponds to attaching a Mobius band to a single annulus boundary. More...
class  NSatLST
 A saturated block that is a layered solid torus. More...
class  NSatTriPrism
 A saturated block that is a three-tetrahedron triangular prism. More...
class  NSatCube
 A saturated block that is a six-tetrahedron cube. More...
class  NSatReflectorStrip
 A saturated block that is a reflector strip. More...
class  NSatLayering
 A degenerate saturated block that is a single tetrahedron wrapped around so that two opposite edges touch. More...
struct  NSatBlockSpec
 Describes how a single saturated block forms a part of a larger saturated region. More...
class  NSatRegion
 A large saturated region in a Seifert fibred space formed by joining together saturated blocks. More...
class  NSnapPeaCensusTri
 Represents a 3-manifold triangulation from the SnapPea cusped census. More...
class  NSnappedBall
 Represents a snapped 3-ball in a triangulation. More...
class  NSnappedTwoSphere
 Represents a 2-sphere made from two snapped 3-balls in a triangulation. More...
class  NSpiralSolidTorus
 Represents a spiralled solid torus in a triangulation. More...
class  NStandardTriangulation
 Describes a triangulation or subcomplex of a triangulation whose structure is well-understood. More...
class  NTriSolidTorus
 Represents a three-tetrahedron triangular solid torus in a triangulation. More...
class  NTrivialTri
 Represents one of a few particular trivial triangulations that do not belong to any of the other larger families. More...
class  NTxICore
 Provides a triangulation of the product T x I (the product of the torus and the interval). More...
class  NTxIDiagonalCore
 One of a family of thin T x I triangulations that typically appear at the centres of layered torus bundles. More...
class  NTxIParallelCore
 A specific six-tetrahedron NTxICore triangulation that does not fit neatly into other families. More...
struct  NDiscSpec
 Specifies a single normal disc in a normal surface. More...
class  NDiscSetTet
 Represents a set of normal discs inside a single tetrahedron. More...
class  NDiscSetTetData
 Stores data of type T for every normal disc inside a single tetrahedron. More...
class  NDiscSetSurface
 Represents the set of all normal discs forming a normal surface. More...
class  NDiscSetSurfaceData
 Stores data of type T for every normal disc within a particular normal surface. More...
class  NDiscSpecIterator
 An iterator used for running through all normal discs in a normal surface. More...
struct  NDiscType
 Identifies a single normal or almost normal disc type within a triangulation. More...
class  NNormalSurfaceVector
 Stores the vector of a single normal surface in a 3-manifold. More...
class  NNormalSurface
 Represents a single normal surface in a 3-manifold. More...
class  NNormalSurfaceList
 A packet representing a collection of normal surfaces in a 3-manifold. More...
struct  NPrismSpec
 Specifies a single triangular prism in a tetrahedron. More...
class  NPrismSetSurface
 Represents the set of prisms defined by slicing along all the quads in a particular normal surface. More...
class  NNormalSurfaceVectorANStandard
 An almost normal surface vector using standard triangle-quad-oct coordinates. More...
class  NNormalSurfaceVectorMirrored
 A normal surface vector that is mirrored in another coordinate system to avoid frequent lengthy calculations. More...
class  NNormalSurfaceVectorQuad
 A normal surface vector using quad coordinates. More...
class  NNormalSurfaceVectorQuadOct
 An almost normal surface vector using quad-oct coordinates. More...
class  NNormalSurfaceVectorStandard
 A normal surface vector using standard triangle-quad coordinates. More...
class  NSurfaceFilter
 A packet that accepts or rejects normal surfaces. More...
class  NSurfaceSet
 Represents a collection of normal surfaces in a 3-manifold. More...
class  NSurfaceSubset
 Represents a subset of a normal surface set. More...
class  NXMLFilterReader
 An XML element reader that reads the specific details of a normal surface filter. More...
class  NXMLFilterPacketReader
 An XML packet reader that reads a single surface filter. More...
class  NXMLNormalSurfaceReader
 An XML element reader that reads a single normal surface. More...
class  NXMLNormalSurfaceListReader
 An XML packet reader that reads a single normal surface list. More...
class  NSurfaceFilterCombination
 A normal surface filter that simply combines other filters. More...
class  NSurfaceFilterProperties
 A normal surface filter that filters by basic properties of the normal surface. More...
class  NBoundaryComponent
 Represents a component of the boundary of a triangulation. More...
class  NComponent
 Represents a component of a triangulation. More...
class  NEdgeEmbedding
 Details how an edge in the skeleton forms part of an individual tetrahedron. More...
class  NEdge
 Represents an edge in the skeleton of a triangulation. More...
class  NExampleTriangulation
 This class offers routines for constructing sample triangulations of various types. More...
class  NFaceEmbedding
 Details how a face in the skeleton forms part of an individual tetrahedron. More...
class  NFace
 Represents a face in the skeleton of a triangulation. More...
class  NFacePair
 Represents a pair of tetrahedron face numbers. More...
class  NHomologicalData
 Data type that deals with all the detailed homological information in a manifold. More...
class  NIsomorphism
 Represents a combinatorial isomorphism from one triangulation into another. More...
class  NIsomorphismDirect
 A deprecated synonym for NIsomorphism, provided for backward compatibility only. More...
class  NPerm
 Represents a permutation of {0,1,2,3}. More...
class  NPermItS4
 An iterator class that runs through all 24 permutations of four elements. More...
struct  NTetFace
 A lightweight class used to refer to a particular face of a particular tetrahedron. More...
class  NTetrahedron
 Represents a tetrahedron in a triangulation. More...
class  NTriangulation
 Stores the triangulation of a 3-manifold along with its various cellular structures and other information. More...
class  NVertexEmbedding
 Details how a vertex in the skeleton forms part of an individual tetrahedron. More...
class  NVertex
 Represents a vertex in the skeleton of a triangulation. More...
class  NXMLTriangulationReader
 An XML packet reader that reads a single triangulation. More...
class  BitManipulator
 An optimised class for bitwise analysis and manipulation of native data types. More...
struct  HashPointer
 A hash function used to calculate hash values for arbitrary pointers. More...
struct  HashString
 A hash function used to calculate hash values for C++ strings. More...
struct  FuncNew
 An adaptable generator used to create objects using default constructors. More...
struct  FuncNewCopyPtr
 An adaptable unary function used to create objects using copy constructors. More...
struct  FuncNewCopyRef
 An adaptable unary function used to create objects using copy constructors. More...
struct  FuncNewClonePtr
 An adaptable unary function used to create objects using the clone() method. More...
struct  FuncDelete
 An adaptable unary function used to deallocate objects. More...
class  NBitmask
 A bitmask that can store arbitrarily many true-or-false bits. More...
class  NBitmask1
 A small but extremely fast bitmask class that can store up to 8 * sizeof(T) true-or-false bits. More...
class  NBitmask2
 A small but extremely fast bitmask class that can store up to 8 * sizeof(T) + 8 * sizeof(U) true-or-false bits. More...
class  NTriBool
 A three-way extension of the boolean type. More...
class  NTriBool_Illegal_Integer_Conversion
 An exception thrown when an illegal integer conversion is attempted with NTriBool. More...
class  NBoolSet
 A set of booleans. More...
class  NIndexedArray
 A dynamically resizable array of objects of type T with fast random access and fast object-to-index lookup. More...
class  NListOnCall
 Offers a hard-coded list of expensive objects that should only be created if they are required. More...
class  NMarkedElement
 A base class for elements of NMarkedVector. More...
class  NMarkedVector
 A vector of objects with fast, space-efficient reverse lookup of array indices. More...
class  StoreValue
 An NProperty storage policy indicating that the property should be held by value. More...
class  StoreConstPtr
 An NProperty storage policy indicating that the property should be held by constant pointer. More...
class  StoreManagedPtr
 An NProperty storage policy indicating that the property should be held by pointer and that the property wrapper will also take responsibility for memory management. More...
class  NPropertyBase
 A base class that provides routines shared by all properties, regardless of their individual NProperty template parameters. More...
class  NProperty
 Stores a calculable property of an object. More...
class  NMutex
 A mutual exclusion device (mutex) used to ensure that different threads do not interfere when working with the same data. More...
class  NThread
 Provides very basic thread handling. More...
class  LessDeref
 An adaptable binary function used to compare the objects to which pointers are pointing. More...
class  ZBuffer
 A common base class for compression/decompression stream buffers. More...
class  CompressionBuffer
 An output stream buffer that compresses data as it is written. More...
class  DecompressionBuffer
 An input stream buffer that decompresses data as it is read. More...
class  CompressionStream
 An output stream that compresses data as it is written. More...
class  DecompressionStream
 An input stream that decompresses data as it is read. More...

Typedefs

typedef bool(* AcceptTriangulation )(NTriangulation *, void *)
 A routine used to determine whether a particular triangulation should be included in a census.
typedef std::list< NIsomorphism * > NFacePairingIsoList
 A list of isomorphisms on pairwise matchings of tetrahedron faces.
typedef void(* UseFacePairing )(const NFacePairing *, const NFacePairingIsoList *, void *)
 A routine used to do arbitrary processing upon a pairwise matching of tetrahedron faces and its automorphisms.
typedef void(* UseGluingPerms )(const NGluingPermSearcher *, void *)
 A routine used to do arbitrary processing upon a particular set of gluing permutations.
typedef NDoubleDescription NDoubleDescriptor
 A legacy typedef provided for backward compatibility only.
typedef std::list
< NSigPartialIsomorphism * > 
NSigIsoList
 A list of partial isomorphisms on splitting surface signatures.
typedef void(* UseSignature )(const NSignature &, const NSigIsoList &, void *)
 A routine used to do arbitrary processing upon a splitting surface signature and its automorphisms.
typedef pthread_t NThreadID
 The type used for a thread identifier.

Enumerations

enum  SurfaceExportFields {
  surfaceExportName = 0x0001, surfaceExportEuler = 0x0002, surfaceExportOrient = 0x0004, surfaceExportSides = 0x0008,
  surfaceExportBdry = 0x0010, surfaceExportLink = 0x0020, surfaceExportType = 0x0040, surfaceExportNone = 0,
  surfaceExportAllButName = 0x007e, surfaceExportAll = 0x007f
}
 

Indicates a set of additional fields that can be exported as part of a normal surface list.

More...

Functions

std::ostream & operator<< (std::ostream &out, const NGroupExpressionTerm &term)
 Writes the given term to the given output stream.
const char * getVersionString ()
 Returns the full version number of this calculation engine.
int getVersionMajor ()
 Returns the major version number of this calculation engine.
int getVersionMinor ()
 Returns the minor version number of this calculation engine.
bool versionUsesUTF8 (const char *version)
 Did the given version of Regina consistently use UTF-8 in its data files?
int testEngine (int value)
 Tests to see if an interface can successfully communicate with the underlying C++ calculation engine.
NPacketreadFromFile (const char *fileName)
 Reads a packet tree from the given old-style binary file doing everything in a single step.
bool writeToFile (const char *fileName, NPacket *packet)
 Writes the given packet tree to the given old-style binary file doing everything in a single step.
bool writeXMLFile (const char *fileName, NPacket *subtree, bool compressed=true)
 Writes the subtree with the given packet as matriarch to disk as a complete XML file.
NPacketreadXMLFile (const char *fileName)
 Reads the packet tree stored in the given XML file.
NPacketreadFileMagic (const std::string &fileName)
 Reads a packet tree from a file whose format is unknown.
bool writeCSVStandard (const char *filename, NNormalSurfaceList &surfaces, int additionalFields=surfaceExportAll)
 Exports the given list of normal surfaces as a plain text CSV (comma-separated value) file.
bool writeCSVEdgeWeight (const char *filename, NNormalSurfaceList &surfaces, int additionalFields=surfaceExportAll)
 Exports the given list of normal surfaces as a plain text CSV (comma-separated value) file.
NContainerreadDehydrationList (const char *filename, unsigned colDehydrations=0, int colLabels=-1, unsigned long ignoreLines=0)
 Reads a list of dehydrated triangulations from the given text file.
NTriangulationreadOrb (const char *filename)
 Reads a triangulation from the given Orb / Casson file.
NPDFreadPDF (const char *filename)
 Reads a PDF document from the given file.
bool writePDF (const char *filename, const NPDF &pdf)
 Writes the given PDF document to the given file.
NTriangulationreadSnapPea (const char *filename)
 Reads a triangulation from the given SnapPea file.
bool writeSnapPea (const char *filename, NTriangulation &tri)
 Writes the given triangulation to the given file in SnapPea format.
std::string stringToToken (const char *str)
 Returns a token derived from the given string.
std::string stringToToken (const std::string &str)
 Returns a token derived from the given string.
std::ostream & operator<< (std::ostream &out, const NSFSFibre &f)
 Writes the given fibre in human-readable format to the given output stream.
template<class R >
bool isZero (R x)
 Determines whether the given real number is zero.
template<class R >
bool isNonZero (R x)
 Determines whether the given real number is non-zero.
template<class R >
bool isPositive (R x)
 Determines whether the given real number is strictly positive.
template<class R >
bool isNegative (R x)
 Determines whether the given real number is strictly negative.
template<class R >
bool isNonNegative (R x)
 Determines whether the given real number is non-negative.
template<class R >
bool isNonPositive (R x)
 Determines whether the given real number is non-positive.
void smithNormalForm (NMatrixInt &matrix)
 Transforms the given integer matrix into Smith normal form.
void smithNormalForm (NMatrixInt &matrix, NMatrixInt &rowSpaceBasis, NMatrixInt &rowSpaceBasisInv, NMatrixInt &colSpaceBasis, NMatrixInt &colSpaceBasisInv)
 A Smith normal form algorithm that also returns change of basis matrices.
unsigned rowBasis (NMatrixInt &matrix)
 Find a basis for the row space of the given matrix.
unsigned rowBasisAndOrthComp (NMatrixInt &input, NMatrixInt &complement)
 Finds a basis for the row space of the given matrix, as well as an "incremental" basis for its orthogonal complement.
void columnEchelonForm (NMatrixInt &M, NMatrixInt &R, NMatrixInt &Ri, const std::vector< unsigned > &rowList)
 Transforms a given matrix into column echelon form with respect to a collection of rows.
std::auto_ptr< NMatrixIntpreImageOfLattice (const NMatrixInt &hom, const std::vector< NLargeInteger > &sublattice)
 Given a homomorphism from Z^n to Z^k and a sublattice of Z^k, compute the preimage of this sublattice under this homomorphism.
template<class T >
std::ostream & operator<< (std::ostream &out, const NFastVector< T > &vector)
 Writes the given vector to the given output stream.
std::ostream & operator<< (std::ostream &out, const NLargeInteger &large)
 Writes the given integer to the given output stream.
std::ostream & operator<< (std::ostream &out, const NMatrix2 &mat)
 Writes the given matrix to the given output stream.
bool simpler (const NMatrix2 &m1, const NMatrix2 &m2)
 Determines whether the first given matrix is more aesthetically pleasing than the second.
bool simpler (const NMatrix2 &pair1first, const NMatrix2 &pair1second, const NMatrix2 &pair2first, const NMatrix2 &pair2second)
 Determines whether the first given pair of matrices is more aesthetically pleasing than the second pair.
std::ostream & operator<< (std::ostream &out, const NRational &rat)
 Writes the given rational to the given output stream.
NRayintersect (const NRay &pos, const NRay &neg, const NVector< NLargeInteger > &hyperplane)
 Returns a newly allocated ray representing the intersection of the hyperplane joining two given rays with the given additional hyperplane.
long reducedMod (long k, long modBase)
 Reduces k modulo modBase to give the smallest possible absolute value.
long gcd (long a, long b)
 Calculates the greatest common divisor of two signed integers.
long gcdWithCoeffs (long a, long b, long &u, long &v)
 Calculates the greatest common divisor of two given integers and finds the smallest coefficients with which these integers combine to give their gcd.
long lcm (long a, long b)
 Calculates the lowest common multiple of two signed integers.
unsigned long modularInverse (unsigned long n, unsigned long k)
 Calculates the multiplicative inverse of one integer modulo another.
void factorise (unsigned long n, std::list< unsigned long > &factors)
 Calculates the prime factorisation of the given integer.
void primesUpTo (const NLargeInteger &roof, std::list< NLargeInteger > &primes)
 Determines all primes up to and including the given upper bound.
template<class T >
std::ostream & operator<< (std::ostream &out, const NVector< T > &vector)
 Writes the given vector to the given output stream.
unsigned long formSigCensus (unsigned order, UseSignature use, void *useArgs=0)
 Forms a census of all splitting surface signatures of the given order.
std::ostream & operator<< (std::ostream &out, const NDiscSpec &spec)
 Writes the given disc specifier to the given output stream.
bool numberDiscsAwayFromVertex (int discType, int vertex)
 Determines whether or not normal discs of the given type are numbered away from the given vertex.
bool discOrientationFollowsEdge (int discType, int vertex, int edgeStart, int edgeEnd)
 Determines whether or not the natural boundary orientation of a normal disc of the given type follows the given directed normal arc.
std::ostream & operator<< (std::ostream &out, const NDiscType &type)
 Writes the given disc type to the given output stream.
NNormalSurfaceVectormakeZeroVector (const NTriangulation *triangulation, int flavour)
 Returns a new normal surface vector of the appropriate length for the given triangulation and the given flavour of coordinate system.
NMatrixIntmakeMatchingEquations (NTriangulation *triangulation, int flavour)
 Creates a new set of normal surface matching equations for the given triangulation using the given flavour of coordinate system.
std::ostream & operator<< (std::ostream &out, const NPrismSpec &spec)
 Writes the given prism specifier to the given output stream.
std::ostream & operator<< (std::ostream &out, const NPerm &p)
 Writes a string representation of the given permutation to the given output stream.
NPerm faceOrdering (int face)
 Returns a permutation mapping (0,1,2) to the vertices of the given tetrahedron face in their canonical order.
NPerm edgeOrdering (int edge)
 Returns a permutation mapping (0,1) to the vertices of the given tetrahedron edge in their canonical order.
std::string faceDescription (int face)
 Returns a string representation of the permutation mapping (0,1,2) to the vertices of the given tetrahedron face in their canonical order, as described in faceOrdering().
std::string faceDescription (const NPerm &facePerm)
 Returns a string representation of the given permutation with only the images of 0, 1 and 2 included.
std::string edgeDescription (int edge)
 Returns a string representation of the permutation mapping (0,1) to the vertices of the given tetrahedron edge in their canonical order, as described in edgeOrdering().
std::string edgeDescription (const NPerm &edgePerm)
 Returns a string representation of the given permutation with only the images of 0 and 1 included.
size_t base64Length (size_t bytes)
 Returns the number of base64 characters required to encode the given number of bytes.
bool isBase64 (char ch)
 Determines whether the given character is a base64 printable character as used by the base64 routines in Regina.
void base64Encode (const char *in, size_t inlen, char *out, size_t outlen)
 Encodes the given sequence of raw bytes in base64, and writes the results into a preallocated output buffer.
size_t base64Encode (const char *in, size_t inlen, char **out)
 Encodes the given sequence of raw bytes in base64, and passes back a newly allocated array containing the results.
bool base64Decode (const char *in, size_t inlen, char *out, size_t *outlen)
 Decodes the given sequence of base64 characters, and writes the resulting raw bytes into a preallocated output buffer.
bool base64Decode (const char *in, size_t inlen, char **out, size_t *outlen)
 Decodes the given sequence of base64 characters, and passes back a newly allocated array containing the results.
std::ostream & operator<< (std::ostream &out, const NBitmask &mask)
 Writes the given bitmask to the given output stream as a sequence of zeroes and ones.
template<typename T >
std::ostream & operator<< (std::ostream &out, const NBitmask1< T > &mask)
 Writes the given bitmask to the given output stream as a sequence of zeroes and ones.
template<typename T , typename U >
std::ostream & operator<< (std::ostream &out, const NBitmask2< T, U > &mask)
 Writes the given bitmask to the given output stream as a sequence of zeroes and ones.
std::ostream & operator<< (std::ostream &out, const NTriBool &set)
 Writes the given three-way boolean to the given output stream.
std::ostream & operator<< (std::ostream &out, const NBoolSet &set)
 Writes the given boolean set to the given output stream.
template<class Data , class HashFcn , class EqualTo >
bool operator== (const NIndexedArray< Data, HashFcn, EqualTo > &array1, const NIndexedArray< Data, HashFcn, EqualTo > &array2)
 See the C++ standard.
template<class Data , class HashFcn , class EqualTo >
bool operator< (const NIndexedArray< Data, HashFcn, EqualTo > &array1, const NIndexedArray< Data, HashFcn, EqualTo > &array2)
 See the C++ standard.
void writeResUsage (std::ostream &out)
 Writes time and memory usage for the current process to the given output stream.
template<typename T >
T * clonePtr (T *cloneMe)
 A simple routine for cloning an object if and only if it exists.
template<typename T >
T * clonePtr (const std::auto_ptr< T > &cloneMe)
 A simple routine for cloning an object if and only if it exists.
char * duplicate (const std::string &str)
 Creates a new C string that is a duplicate of the given C++ string.
bool startsWith (const std::string &str, const std::string &prefix)
 Determines whether the given C++ string begins with the given prefix.
std::string stripWhitespace (const std::string &str)
 Strips all whitespace from the beginning and end of the given C++ string.
bool valueOf (const std::string &str, int &dest)
 Converts the entire given string to an integer and reports whether this conversion was successful.
bool valueOf (const std::string &str, unsigned &dest)
 Converts the entire given string to an unsigned integer and reports whether this conversion was successful.
bool valueOf (const std::string &str, long &dest)
 Converts the entire given string to a long integer and reports whether this conversion was successful.
bool valueOf (const std::string &str, unsigned long &dest)
 Converts the entire given string to an unsigned long integer and reports whether this conversion was successful.
bool valueOf (const std::string &str, NLargeInteger &dest)
 Converts the entire given string to an arbitrary precision integer and reports whether this conversion was successful.
bool valueOf (const std::string &str, double &dest)
 Converts the entire given string to a double precision real number and reports whether this conversion was successful.
bool valueOf (const std::string &str, bool &dest)
 Converts the entire given string to a boolean and reports whether this conversion was successful.
bool valueOf (const std::string &str, NTriBool &dest)
 Converts the entire given string to a three-way boolean (true, false or unknown) and reports whether this conversion was successful.
bool valueOf (const std::string &str, NBoolSet &dest)
 Converts the entire given string to a set of booleans and reports whether this conversion was successful.
template<class OutputIterator >
unsigned basicTokenise (OutputIterator results, const std::string &str)
 Decomposes the given string into tokens.

Variables

const double epsilon
 A very small positive real designed to accommodate for rounding error.
const int vertexSplit [4][4]
 Lists which vertex splits split which pairs of vertices.
const int vertexSplitMeeting [4][4][2]
 Lists which vertex splits meet which edges.
const int vertexSplitDefn [3][4]
 Lists the vertices which each vertex split splits.
const int vertexSplitPartner [3][4]
 Lists the second vertex with which each vertex is paired under each vertex split.
const char vertexSplitString [3][6]
 Contains strings describing which vertices each vertex split splits.
const NPerm triDiscArcs [4][3]
 Lists in consecutive order the directed normal arcs that form the boundary of each type of triangular normal disc.
const NPerm quadDiscArcs [3][4]
 Lists in consecutive order the directed normal arcs that form the boundary of each type of quadrilateral normal disc.
const NPerm octDiscArcs [3][8]
 Lists in consecutive order the directed normal arcs that form the boundary of each type of octagonal normal disc.
const int edgeNumber [4][4]
 edgeNumber[i][j] is the number of the edge linking vertices i and j in a tetrahedron.
const int edgeStart [6]
 edgeStart[k] is the vertex of a tetrahedron at which edge k of the tetrahedron begins.
const int edgeEnd [6]
 edgeEnd[k] is the vertex of a tetrahedron at which edge k of the tetrahedron ends.
const NPermallPermsS4
 An array of size 24 containing all possible permutations of four elements.
const unsigned * allPermsS4Inv
 An array of size 24 containing the inverses of the permutations in the array allPermsS4.
const NPermorderedPermsS4
 An array of size 24 containing all possible permutations of four elements in lexicographical order.
const NPermallPermsS3
 An array of size 6 containing all possible permutations of three elements.
const unsigned * allPermsS3Inv
 An array of size 6 containing the inverses of the permutations in the array allPermsS3.
const NPermorderedPermsS3
 An array of size 6 containing all possible permutations of three elements in lexicographical order.
const NPermallPermsS2
 An array of size 2 containing all possible permutations of two elements.
const unsigned * allPermsS2Inv
 An array of size 2 containing the inverses of the permutations in the array allPermsS2.

Detailed Description

Contains the entire Regina calculation engine.

Todo:

Bug: Derive from regina::boost::noncopyable where appropriate.

Feature (long-term): Enhance the test suite for the calculation engine.


Typedef Documentation

A legacy typedef provided for backward compatibility only.

Deprecated:
As of Regina 4.6, the class NDoubleDescriptor has been renamed as NDoubleDescription. This renaming is merely for consistency in documentation and nomenclature; the functionality of the new NDoubleDescription class is identical to the old NDoubleDescriptor class as it was in Regina 4.5.1. This typedef is provided for backward compatibility, and will be removed in some future version of Regina.

Function Documentation

void regina::writeResUsage ( std::ostream &  out  ) 

Writes time and memory usage for the current process to the given output stream.

Information is gathered from the /proc filesystem, which means that this routine will only write meaningful information under a Linux system where /proc is mounted.

Specifically, this routine reads information on the running process from /proc/self/stat, and writes a short string to the given output stream of the form:

 utime=..., stime=..., vsize=...

The three ellipses in the example above will be replaced with integers, representing:

  • the number jiffies that this process has been scheduled in user mode (the utime field);
  • the number jiffies that this process has been scheduled in kernel mode (the stime field);
  • the the virtual memory size in bytes (the vsize field).

The description of these three fields is taken directly from the proc(5) manpage. Note that the length of a jiffy can differ from system to system; see the time(7) manpage for details.

The output will not contain a newline, and the given output stream will not be flushed.

If /proc/self/stat cannot be read, this routine will write a short message to that effect to the given output stream (which means that this utility is safe to call under non-Linux operating systems, although it will of course be useless in such scenarios).

If /proc/self/stat can be read but contains unexpected information, the behaviour of this routine is undefined.

Python:
This routine does not take any arguments; instead the stream out is assumed to be standard output.
Warning:
Currently this routine allows at most 255 characters for the comm field in /proc/self/stat (which stores the executable filename along with surrounding parentheses). If the comm field is too long (i.e., the executable filename is too long), then this routine will not be able to parse /proc/self/stat, and will write a note to this effect to the given output stream. If you encounter this problem, you should be able to fix it by renaming your executable to something shorter.
Parameters:
out the output stream to which usage information will be written.

Copyright © 1999-2009, Ben Burton
This software is released under the GNU General Public License.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).