Encompasses the orientation of a shape along a fused bond. More...
#include <Composites.h>
Public Member Functions | |
OrientationState (Shapes::Shape passShape, Shapes::Vertex passFusedVertex, std::vector< char > passCharacters, std::size_t passIdentifier) | |
Member initializing constructor. | |
std::vector< char > | applyCharacterRotation (const std::vector< Shapes::Vertex > &rotation) const |
Applies a rotation to the fused position and ranking characters. More... | |
Shapes::Vertex | lowestEqualVertexInShape () const |
Smallest shape vertex from the same group as the fused position. More... | |
std::vector< Shapes::Vertex > | findReductionMapping (Shapes::Vertex reducedFusedVertex) const |
Calculates the required reduction mapping to the canonical form. More... | |
std::vector< Shapes::Vertex > | transformToCanonical () |
Transforms the OrientationState to a canonical form. More... | |
void | revert (const std::vector< Shapes::Vertex > &reversionMapping) |
Reverts the OrientationState to a non-canonical form. More... | |
AngleGroup | smallestAngleGroup () const |
Collects all coplanar indices that are closest to the fused shape vertex. More... | |
auto | tie () const |
Full tuple-like lexicographical comparison of members in order of declaration. | |
![]() | |
constexpr bool | operator== (const LexicographicComparable &other) const |
constexpr bool | operator!= (const LexicographicComparable &other) const |
constexpr bool | operator< (const LexicographicComparable &other) const |
constexpr bool | operator<= (const LexicographicComparable &other) const |
constexpr bool | operator> (const LexicographicComparable &other) const |
constexpr bool | operator>= (const LexicographicComparable &other) const |
Data Fields | |
Shapes::Shape | shape |
The shape of either positional shape. | |
Shapes::Vertex | fusedVertex |
The shape vertex of the local shape that the other is fused at. | |
std::vector< char > | characters |
Abstract ranking-characters of the sites at their shape vertices. | |
std::size_t | identifier |
An identifier to the shape source. More... | |
Additional Inherited Members | |
![]() | |
static constexpr const OrientationState & | getDerived (const LexicographicComparable &base) |
Encompasses the orientation of a shape along a fused bond.
Comparison is based upon lexicographic comparison of its struct members in order of declaration.
std::vector<char> Scine::Molassembler::Stereopermutations::Composite::OrientationState::applyCharacterRotation | ( | const std::vector< Shapes::Vertex > & | rotation | ) | const |
Applies a rotation to the fused position and ranking characters.
Complexity \(\Theta(N)\)
std::vector<Shapes::Vertex> Scine::Molassembler::Stereopermutations::Composite::OrientationState::findReductionMapping | ( | Shapes::Vertex | reducedFusedVertex | ) | const |
Calculates the required reduction mapping to the canonical form.
Complexity \(O(S!)\) where \(S\) is the size of the shape. More precisely, this function scales linearly with the number of unlinked stereopermutations if all substituents are different, but that itself probably scales factorially in the size of the shape.
Shapes::Vertex Scine::Molassembler::Stereopermutations::Composite::OrientationState::lowestEqualVertexInShape | ( | ) | const |
Smallest shape vertex from the same group as the fused position.
Complexity \(\Theta(S^2)\)
void Scine::Molassembler::Stereopermutations::Composite::OrientationState::revert | ( | const std::vector< Shapes::Vertex > & | reversionMapping | ) |
Reverts the OrientationState to a non-canonical form.
Call this with the result of transformToCanonical()!
Complexity \(\Theta(S)\)
AngleGroup Scine::Molassembler::Stereopermutations::Composite::OrientationState::smallestAngleGroup | ( | ) | const |
Collects all coplanar indices that are closest to the fused shape vertex.
Complexity \(\Theta(S)\)
std::vector<Shapes::Vertex> Scine::Molassembler::Stereopermutations::Composite::OrientationState::transformToCanonical | ( | ) |
Transforms the OrientationState to a canonical form.
Transforms the OrientationState by applying a reduction mapping to the smallest shape vertex from the same group as the fused position. Returns the mapping needed to revert the OrientationState back to its original data values.
Complexity \(O(S!)\) where \(S\) is the size of the shape (see findReductionMapping)
std::size_t Scine::Molassembler::Stereopermutations::Composite::OrientationState::identifier |
An identifier to the shape source.
Since OrientationState is used internally in an ordered pair which may swap elements on changes, an identifier can be useful in reassociating the OrientationState with its data source.