Regina 7.3 Calculation Engine
Public Member Functions | List of all members
regina::LPSystem Class Reference

Indicates which broad class of vector encodings a particular tableaux is designed to work with. More...

#include <enumerate/treelp.h>

Inheritance diagram for regina::LPSystem:
regina::ShortOutput< LPSystem > regina::Output< LPSystem, false >

Public Member Functions

constexpr LPSystem (NormalEncoding enc)
 Identifies which class of vector encodings the given encoding falls into. More...
 
constexpr LPSystem (const LPSystem &)=default
 Creates a new copy of the given class of vector encodings. More...
 
LPSystemoperator= (const LPSystem &)=default
 Sets this to be a copy of the given class of vector encodings. More...
 
constexpr bool operator== (const LPSystem &other) const
 Determines whether this and the given object represent the same class of vector encodings. More...
 
constexpr bool operator!= (const LPSystem &other) const
 Determines whether this and the given object represent different classes of vector encodings. More...
 
constexpr bool normal () const
 Identifies whether this is one of the two classes of encodings that represent normal or almost normal surfaces. More...
 
constexpr bool angle () const
 Identifies whether this is the class of encodings that represent angle structures. More...
 
constexpr bool standard () const
 Identifies whether this is the class of standard encodings. More...
 
constexpr bool quad () const
 Identifies whether this is the class of quad encodings. More...
 
constexpr size_t coords (size_t nTet) const
 Returns the number of coordinate columns that a tableaux will use for this class of vector encodings, with respect to a particular triangulation. More...
 
void writeTextShort (std::ostream &out) const
 Writes a short text representation of this object to the given output stream. More...
 
void writeTextLong (std::ostream &out) const
 A default implementation for detailed output. More...
 
std::string str () const
 Returns a short text representation of this object. More...
 
std::string utf8 () const
 Returns a short text representation of this object using unicode characters. More...
 
std::string detail () const
 Returns a detailed text representation of this object. More...
 

Detailed Description

Indicates which broad class of vector encodings a particular tableaux is designed to work with.

This type is used by Regina's linear programming machinery, and in particular by the LPInitialTableaux class.

By "broad class of vector encodings", we allow only three options:

When working with almost normal coordinate systems, we represent octagons as pairs of intersecting quadrilaterals; see the LPData class notes for more information on how this works. This means, for example, that the coordinate system NS_AN_STANDARD will fall under the class of standard encodings, and NS_AN_QUAD_OCT will fall under the class of quad encodings.

These objects are small enough to pass by value and swap with std::swap(), with no need for any specialised move operations or swap functions.

Constructor & Destructor Documentation

◆ LPSystem() [1/2]

constexpr regina::LPSystem::LPSystem ( NormalEncoding  enc)
inlineconstexpr

Identifies which class of vector encodings the given encoding falls into.

Parameters
enca normal surface vector encoding; this may be any valid NormalEncoding object, including the special angle structure encoding.

◆ LPSystem() [2/2]

constexpr regina::LPSystem::LPSystem ( const LPSystem )
constexprdefault

Creates a new copy of the given class of vector encodings.

Member Function Documentation

◆ angle()

constexpr bool regina::LPSystem::angle ( ) const
inlineconstexpr

Identifies whether this is the class of encodings that represent angle structures.

Exactly one of normal() and angle() will return true.

Returns
true if this is the class of angle encodings.

◆ coords()

constexpr size_t regina::LPSystem::coords ( size_t  nTet) const
inlineconstexpr

Returns the number of coordinate columns that a tableaux will use for this class of vector encodings, with respect to a particular triangulation.

Parameters
nTetthe number of tetrahedra in the triangulation.
Returns
the corresponding number of coordinate columns in the tableaux.

◆ detail()

std::string regina::Output< LPSystem , supportsUtf8 >::detail ( ) const
inherited

Returns a detailed text representation of this object.

This text may span many lines, and should provide the user with all the information they could want. It should be human-readable, should not contain extremely long lines (which cause problems for users reading the output in a terminal), and should end with a final newline. There are no restrictions on the underlying character set.

Returns
a detailed text representation of this object.

◆ normal()

constexpr bool regina::LPSystem::normal ( ) const
inlineconstexpr

Identifies whether this is one of the two classes of encodings that represent normal or almost normal surfaces.

This will be true if and only if either standard() or quad() returns true.

Exactly one of normal() and angle() will return true.

Returns
true if this is a class of normal or almost normal surface encodings.

◆ operator!=()

constexpr bool regina::LPSystem::operator!= ( const LPSystem other) const
inlineconstexpr

Determines whether this and the given object represent different classes of vector encodings.

Parameters
otherthe object to compare with this.
Returns
true if and only if both objects represent different classes of encodings.

◆ operator=()

LPSystem & regina::LPSystem::operator= ( const LPSystem )
default

Sets this to be a copy of the given class of vector encodings.

Returns
a reference to this object.

◆ operator==()

constexpr bool regina::LPSystem::operator== ( const LPSystem other) const
inlineconstexpr

Determines whether this and the given object represent the same class of vector encodings.

Parameters
otherthe object to compare with this.
Returns
true if and only if both objects represent the same class of encodings.

◆ quad()

constexpr bool regina::LPSystem::quad ( ) const
inlineconstexpr

Identifies whether this is the class of quad encodings.

Exactly one of standard(), quad() and angle() will return true.

Returns
true if this is the class of quad encodings.

◆ standard()

constexpr bool regina::LPSystem::standard ( ) const
inlineconstexpr

Identifies whether this is the class of standard encodings.

Exactly one of standard(), quad() and angle() will return true.

Returns
true if this is the class of standard encodings.

◆ str()

std::string regina::Output< LPSystem , supportsUtf8 >::str ( ) const
inherited

Returns a short text representation of this object.

This text should be human-readable, should use plain ASCII characters where possible, and should not contain any newlines.

Within these limits, this short text ouptut should be as information-rich as possible, since in most cases this forms the basis for the Python __str__() and __repr__() functions.

Python
The Python "stringification" function __str__() will use precisely this function, and for most classes the Python __repr__() function will incorporate this into its output.
Returns
a short text representation of this object.

◆ utf8()

std::string regina::Output< LPSystem , supportsUtf8 >::utf8 ( ) const
inherited

Returns a short text representation of this object using unicode characters.

Like str(), this text should be human-readable, should not contain any newlines, and (within these constraints) should be as information-rich as is reasonable.

Unlike str(), this function may use unicode characters to make the output more pleasant to read. The string that is returned will be encoded in UTF-8.

Returns
a short text representation of this object.

◆ writeTextLong()

void regina::ShortOutput< LPSystem , false >::writeTextLong ( std::ostream &  out) const
inlineinherited

A default implementation for detailed output.

This routine simply calls T::writeTextShort() and appends a final newline.

Python
Not present. Instead you can call detail() from the subclass T, which returns this output as a string.
Parameters
outthe output stream to which to write.

◆ writeTextShort()

void regina::LPSystem::writeTextShort ( std::ostream &  out) const
inline

Writes a short text representation of this object to the given output stream.

Python
Not present. Use str() instead.
Parameters
outthe output stream to which to write.

The documentation for this class was generated from the following file:

Copyright © 1999-2023, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@maths.uq.edu.au).