regina::NAngleStructure Class Reference
[Angle Structures]

Represents an angle structure on a triangulation. More...

#include <nanglestructure.h>

Inheritance diagram for regina::NAngleStructure:

regina::ShareableObject regina::NFilePropertyReader regina::boost::noncopyable

List of all members.

Public Member Functions

 NAngleStructure (NTriangulation *triang, NAngleStructureVector *newVector)
 Creates a new angle structure on the given triangulation with the given coordinate vector.
virtual ~NAngleStructure ()
 Destroys this angle structure.
NAngleStructureclone () const
 Creates a newly allocated clone of this angle structure.
NRational getAngle (unsigned long tetIndex, int edgePair) const
 Returns the requested angle in this angle structure.
NTriangulationgetTriangulation () const
 Returns the triangulation on which this angle structure lies.
bool isStrict () const
 Determines whether this is a strict angle structure.
bool isTaut () const
 Determines whether this is a taut structure.
void writeTextShort (std::ostream &out) const
 Writes this object in short text format to the given output stream.
void writeXMLData (std::ostream &out) const
 Writes a chunk of XML containing this angle structure and all of its properties.
void writeToFile (NFile &out) const
 Writes this angle structure and all of its properties to the given old-style binary file.

Static Public Member Functions

static NAngleStructurereadFromFile (NFile &in, NTriangulation *triangulation)
 Reads an angle structure and all its properties from the given old-style binary file.

Protected Member Functions

virtual void readIndividualProperty (NFile &infile, unsigned propType)
 Reads an individual property from an old-style binary file.
void calculateType () const
 Calculates the structure type (strict or taut) and stores it as a property.

Friends

class regina::NXMLAngleStructureReader


Detailed Description

Represents an angle structure on a triangulation.

Once the underlying triangulation changes, this angle structure is no longer valid.

Test:
Tested in the test suite, though not exhaustively.

Constructor & Destructor Documentation

regina::NAngleStructure::NAngleStructure ( NTriangulation triang,
NAngleStructureVector newVector 
) [inline]

Creates a new angle structure on the given triangulation with the given coordinate vector.

Python:
Not present.
Parameters:
triang the triangulation on which this angle structure lies.
newVector a vector containing the individual angles in the angle structure.

regina::NAngleStructure::~NAngleStructure (  )  [inline, virtual]

Destroys this angle structure.

The underlying vector of angles will also be deallocated.


Member Function Documentation

NAngleStructure* regina::NAngleStructure::clone (  )  const

Creates a newly allocated clone of this angle structure.

Returns:
a clone of this angle structure.

NRational regina::NAngleStructure::getAngle ( unsigned long  tetIndex,
int  edgePair 
) const

Returns the requested angle in this angle structure.

The angle returned will be scaled down; the actual angle is the returned value multiplied by pi.

Parameters:
tetIndex the index in the triangulation of the tetrahedron in which the requested angle lives; this should be between 0 and NTriangulation::getNumberOfTetrahedra()-1 inclusive.
edgePair the number of the vertex splitting representing the pair of edges holding the requested angle; this should be between 0 and 2 inclusive. See vertexSplit and vertexSplitDefn for details regarding vertex splittings.
Returns:
the requested angle scaled down by pi.

NTriangulation * regina::NAngleStructure::getTriangulation (  )  const [inline]

Returns the triangulation on which this angle structure lies.

Returns:
the underlying triangulation.

bool regina::NAngleStructure::isStrict (  )  const [inline]

Determines whether this is a strict angle structure.

A strict angle structure has all angles strictly between (not including) 0 and pi.

Returns:
true if and only if this is a strict angle structure.

bool regina::NAngleStructure::isTaut (  )  const [inline]

Determines whether this is a taut structure.

A taut structure contains only angles 0 and pi.

Returns:
true if and only if this is a taut structure.

void regina::NAngleStructure::writeTextShort ( std::ostream &  out  )  const [virtual]

Writes this object in short text format to the given output stream.

The output should fit on a single line and no newline should be written.

Python:
The parameter out does not exist; standard output will be used.
Parameters:
out the output stream to which to write.

Implements regina::ShareableObject.

void regina::NAngleStructure::writeXMLData ( std::ostream &  out  )  const

Writes a chunk of XML containing this angle structure and all of its properties.

This routine will be called from within NAngleStructureList::writeXMLPacketData().

Python:
Not present.
Parameters:
out the output stream to which the XML should be written.

void regina::NAngleStructure::writeToFile ( NFile out  )  const

Writes this angle structure and all of its properties to the given old-style binary file.

This routine writes precisely what readFromFile() reads.

Deprecated:
For the preferred way to write data to file, see writeXMLData() instead.
Precondition:
The given file is currently opened for writing.
Python:
Not present.
Parameters:
out the file to which to write.

static NAngleStructure* regina::NAngleStructure::readFromFile ( NFile in,
NTriangulation triangulation 
) [static]

Reads an angle structure and all its properties from the given old-style binary file.

This routine reads precisely what writeToFile() writes.

Deprecated:
For the preferred way of reading angle structures from file, see class NXMLAngleStructureReader instead.
Precondition:
The given file is currently opened for reading.
Python:
Not present.
Parameters:
in the file from which to read.
triangulation the triangulation on which this angle structure will lie.
Returns:
a newly allocated angle structure containing the information read from file.

virtual void regina::NAngleStructure::readIndividualProperty ( NFile infile,
unsigned  propType 
) [protected, virtual]

Reads an individual property from an old-style binary file.

The property type and bookmarking details should not read; merely the contents of the property that are written to file between NFile::writePropertyHeader() and NFile::writePropertyFooter(). See the NFile::writePropertyHeader() notes for details.

The property type of the property to be read will be passed in propType. If the property type is unrecognised, this routine should simply do nothing and return. If the property type is recognised, this routine should read the property and process it accordingly (e.g., store it in whatever data object is currently being read).

Parameters:
infile the file from which to read the property. This should be open for reading and at the position immediately after writePropertyHeader() would have been called during the corresponding write operation.
propType the property type of the property about to be read.

Implements regina::NFilePropertyReader.

void regina::NAngleStructure::calculateType (  )  const [protected]

Calculates the structure type (strict or taut) and stores it as a property.


The documentation for this class was generated from the following file:
Copyright © 1999-2007, 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).