Regina 7.3 Calculation Engine
|
Represents a partial isomorphism between two splitting surface signatures. More...
#include <split/sigisomorphism.h>
Public Member Functions | |
SigPartialIsomorphism (int newDir) | |
Creates a new partial isomorphism that maps no cycles or symbols. More... | |
SigPartialIsomorphism (const SigPartialIsomorphism &iso) | |
Creates a copy of the given partial isomorphism. More... | |
SigPartialIsomorphism (SigPartialIsomorphism &&src) noexcept | |
Moves the given partial isomorphism into this new partial isomorphism. More... | |
~SigPartialIsomorphism () | |
Destroys this partial isomorphism. More... | |
SigPartialIsomorphism & | operator= (const SigPartialIsomorphism &src) |
Copies the given partial isomorphism into this partial isomorphism. More... | |
SigPartialIsomorphism & | operator= (SigPartialIsomorphism &&src) noexcept |
Moves the given partial isomorphism into this new partial isomorphism. More... | |
void | swap (SigPartialIsomorphism &other) noexcept |
Swaps the contents of this and the given partial isomorphism. More... | |
void | makeCanonical (const Signature &sig, unsigned fromCycleGroup=0) |
Rearranges the cycle images so that this isomorphism when applied to the given signature produces a new signature that is in canonical form. More... | |
bool | operator== (const SigPartialIsomorphism &other) const |
Determines whether this and the given partial isomorphism are identical. More... | |
bool | operator!= (const SigPartialIsomorphism &other) const |
Determines whether this and the given partial isomorphism are not identical. More... | |
int | compareWith (const Signature &sig, const SigPartialIsomorphism &other, unsigned fromCycleGroup=0) const |
Lexicographically compares the results of applying this and the given isomorphism to the given signature. More... | |
int | compareWithIdentity (const Signature &sig, unsigned fromCycleGroup=0) const |
Lexicographically compares the results of applying this and the identity isomorphism to the given signature. 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 | regina::SigCensus |
Represents a partial isomorphism between two splitting surface signatures.
See class Signature for details on splitting surface signatures.
The two signatures related by this partial isomorphism must have the same cycle structure, i.e., the same number of cycle groups and the same cycle length and number of cycles within each cycle group.
The partial isomorphism maps symbols to symbols and cycles to cycles, with the option of rotating some cycles and/or reversing all cycles in the process. Cycles within the kth cycle group of the source signature must map to cycles within the kth cycle group of the destination signature.
A partial isomorphism is only required to map the cycles and symbols found in the first g cycle groups of the source isomorphism (for some g). If only a subset of symbols are mapped, that subset must be symbols 0,1,...,k for some k.
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.
|
inline |
Creates a new partial isomorphism that maps no cycles or symbols.
This empty isomorphism is designed to be extended at some later point.
newDir | positive if this isomorphism specifies that all cycles are reversed, or negative if this isomorphism specifies that all cycles keep their original direction. |
regina::SigPartialIsomorphism::SigPartialIsomorphism | ( | const SigPartialIsomorphism & | iso | ) |
Creates a copy of the given partial isomorphism.
iso | the partial isomorphism to copy. |
|
inlinenoexcept |
Moves the given partial isomorphism into this new partial isomorphism.
This is a fast (constant time) operation.
The partial isomorphism that is passed (src) will no longer be usable.
src | the partial isomorphism to move. |
|
inline |
Destroys this partial isomorphism.
int regina::SigPartialIsomorphism::compareWith | ( | const Signature & | sig, |
const SigPartialIsomorphism & | other, | ||
unsigned | fromCycleGroup = 0 |
||
) | const |
Lexicographically compares the results of applying this and the given isomorphism to the given signature.
Comparisons are done on a cycle-by-cycle basis; comparisons within a cycle are done as described by Signature::cycleCmp(). Comparison will not proceed beyond the cycles mapped by this partial isomorphism.
sig | the signature to which both this and the given isomorphism will be applied. |
other | the isomorphism to compare with this isomorphism. |
fromCycleGroup | the first cycle group whose images should be examined. If it is already known that the cycle images for the first k cycle groups are identical under both isomorphisms, k should be passed in this parameter. This parameter should not exceed the number of cycle groups whose cycles are mapped by this partial isomorphism. |
int regina::SigPartialIsomorphism::compareWithIdentity | ( | const Signature & | sig, |
unsigned | fromCycleGroup = 0 |
||
) | const |
Lexicographically compares the results of applying this and the identity isomorphism to the given signature.
This routine behaves identically to compareWith(), except that it does not take a second isomorphism to compare against. See compareWith() for further details.
sig | the signature to which this isomorphism will be applied. |
fromCycleGroup | the first cycle group whose images should be examined. If it is already known that the cycle images for the first k cycle groups are identical under both this and the identity isomorphism, k should be passed in this parameter. This parameter should not exceed the number of cycle groups whose cycles are mapped by this partial isomorphism. |
|
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.
void regina::SigPartialIsomorphism::makeCanonical | ( | const Signature & | sig, |
unsigned | fromCycleGroup = 0 |
||
) |
Rearranges the cycle images so that this isomorphism when applied to the given signature produces a new signature that is in canonical form.
The result of this routine is dependent upon the symbol map defined by this isomorphism (this symbol map will not be changed).
sig | the signature to which this isomorphism will be applied. |
fromCycleGroup | the first cycle group whose images may be rearranged. If it is already known that the cycle images for the first k cycle groups are correct, k should be passed in this parameter. This parameter should not exceed the number of cycle groups whose cycles are mapped by this partial isomorphism. |
|
inline |
Determines whether this and the given partial isomorphism are not identical.
other | the partial isomorphism to compare with this. |
true
if and only if this and other are not identical. SigPartialIsomorphism & regina::SigPartialIsomorphism::operator= | ( | const SigPartialIsomorphism & | src | ) |
Copies the given partial isomorphism into this partial isomorphism.
It does not matter if this and the given partial isomorphism work with different numbers of symbols or different cycle structures; if they do then this partial isomorphism will be adjusted accordingly.
This operator induces a deep copy of src.
src | the partial isomorphism to copy. |
|
inlinenoexcept |
Moves the given partial isomorphism into this new partial isomorphism.
This is a fast (constant time) operation.
It does not matter if this and the given partial isomorphism work with different numbers of symbols or different cycle structures; if they do then this partial isomorphism will be adjusted accordingly.
The partial isomorphism that is passed (src) will no longer be usable.
src | the partial isomorphism to move. |
bool regina::SigPartialIsomorphism::operator== | ( | const SigPartialIsomorphism & | other | ) | const |
Determines whether this and the given partial isomorphism are identical.
other | the partial isomorphism to compare with this. |
true
if and only if this and other are identical.
|
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.
__str__()
will use precisely this function, and for most classes the Python __repr__()
function will incorporate this into its output.
|
inlinenoexcept |
Swaps the contents of this and the given partial isomorphism.
It does not matter if this and the given partial isomorphism work with different numbers of symbols or different cycle structures; if they do then they will both be adjusted accordingly.
other | the partial isomorphism whose contents are to be swapped with this. |
|
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.
|
inlineinherited |
A default implementation for detailed output.
This routine simply calls T::writeTextShort() and appends a final newline.
out | the output stream to which to write. |
void regina::SigPartialIsomorphism::writeTextShort | ( | std::ostream & | out | ) | const |
Writes a short text representation of this object to the given output stream.
out | the output stream to which to write. |