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

Contains an explicit triangulation of a saturated block along with the accompanying saturated block description. More...

#include <subcomplex/satblock.h>

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

Public Member Functions

 SatBlockModel (const SatBlockModel &src)
 Creates a new copy of the given model. More...
 
 SatBlockModel (SatBlockModel &&src) noexcept
 Moves the contents of the given model into this new model. More...
 
 ~SatBlockModel ()
 Destroys both the internal triangulation and block structure. More...
 
SatBlockModeloperator= (const SatBlockModel &src)
 Sets this to be a copy of the given model. More...
 
SatBlockModeloperator= (SatBlockModel &&src) noexcept
 Moves the contents of the given model into this model. More...
 
void swap (SatBlockModel &other) noexcept
 Swaps the contents of this and the given model. More...
 
const Triangulation< 3 > & triangulation () const
 Returns the triangulation of the saturated block. More...
 
const SatBlockblock () const
 Returns the structure of the saturated block. More...
 
bool operator== (const SatBlockModel &other) const
 Determines whether this and the given object model saturated blocks of the same type with the same combinatorial parameters. More...
 
bool operator!= (const SatBlockModel &other) const
 Determines whether this and the given object do not model saturated blocks of the same type with the same combinatorial parameters. 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...
 

Friends

class SatBlock
 

Detailed Description

Contains an explicit triangulation of a saturated block along with the accompanying saturated block description.

This class is designed to work with SatRegion::findStarterBlock(), which uses such models as potential starting points for its search. The ultimate aim here is to identify regions within triangulations that are formed by joining saturated blocks together along their boundary annuli.

This class implements C++ move semantics and adheres to the C++ Swappable requirement. It is designed to avoid deep copies wherever possible, even when passing or returning objects by value. Note, however, that you cannot create generate your own models manually (aside from copying or moving); instead you will need to use block-specific factory routines such as SatTriPrism::model(), SatCube::model(), and so on.

Constructor & Destructor Documentation

◆ SatBlockModel() [1/2]

regina::SatBlockModel::SatBlockModel ( const SatBlockModel src)
inline

Creates a new copy of the given model.

This will induce a deep copy of both the triangulation and the block structure.

Parameters
srcthe model to copy.

◆ SatBlockModel() [2/2]

regina::SatBlockModel::SatBlockModel ( SatBlockModel &&  src)
inlinenoexcept

Moves the contents of the given model into this new model.

This is a fast (constant time) operation.

The model that was passed (src) will no longer be usable.

Parameters
srcthe model whose contents should be moved.

◆ ~SatBlockModel()

regina::SatBlockModel::~SatBlockModel ( )
inline

Destroys both the internal triangulation and block structure.

Member Function Documentation

◆ block()

const SatBlock & regina::SatBlockModel::block ( ) const
inline

Returns the structure of the saturated block.

Returns
the block structure.

◆ detail()

std::string regina::Output< SatBlockModel , 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.

◆ operator!=()

bool regina::SatBlockModel::operator!= ( const SatBlockModel other) const
inline

Determines whether this and the given object do not model saturated blocks of the same type with the same combinatorial parameters.

This is equivalent to testing whether the blocks returned by block() compare as non-equal. See SatBlock::operator==() for further details on what this comparison means.

Assuming you created your models using the block-specific factory routines (SatTriPrism::model(), SatCube::model(), etc.), if two models compare as equal then their triangulations should be combinatorially identical. At the time of writing, the converse is also true: all models created from non-equal blocks yield non-identical (and moreover non-isomorphic) triangulations.

Parameters
otherthe model to compare with this.
Returns
true if and only if this and the given object do not model the same block type with the same combinatorial parameters.

◆ operator=() [1/2]

SatBlockModel & regina::SatBlockModel::operator= ( const SatBlockModel src)
inline

Sets this to be a copy of the given model.

This will induce a deep copy of both the triangulation and the block structure.

Parameters
srcthe model to copy.
Returns
a reference to this model.

◆ operator=() [2/2]

SatBlockModel & regina::SatBlockModel::operator= ( SatBlockModel &&  src)
inlinenoexcept

Moves the contents of the given model into this model.

This is a fast (constant time) operation.

The model that was passed (src) will no longer be usable.

Parameters
srcthe model whose contents should be moved.
Returns
a reference to this model.

◆ operator==()

bool regina::SatBlockModel::operator== ( const SatBlockModel other) const
inline

Determines whether this and the given object model saturated blocks of the same type with the same combinatorial parameters.

This is equivalent to testing whether the blocks returned by block() compare as equal. See SatBlock::operator==() for further details on what this comparison means.

Assuming you created your models using the block-specific factory routines (SatTriPrism::model(), SatCube::model(), etc.), if two models compare as equal then their triangulations should be combinatorially identical. At the time of writing, the converse is also true: all models created from non-equal blocks yield non-identical (and moreover non-isomorphic) triangulations.

Parameters
otherthe model to compare with this.
Returns
true if and only if this and the given object model the same block type with the same combinatorial parameters.

◆ str()

std::string regina::Output< SatBlockModel , 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.

◆ swap()

void regina::SatBlockModel::swap ( SatBlockModel other)
inlinenoexcept

Swaps the contents of this and the given model.

Parameters
otherthe model whose contents should be swapped with this.

◆ triangulation()

const Triangulation< 3 > & regina::SatBlockModel::triangulation ( ) const
inline

Returns the triangulation of the saturated block.

Returns
the block triangulation.

◆ utf8()

std::string regina::Output< SatBlockModel , 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< SatBlockModel , 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::SatBlockModel::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).