#include <generic_components.h>
Class to represent an undirected edge by specifying two vertices. The vertices are sorted, so upon query it is guaranteed that vertexA <= vertexB. Can also store an invalid state if one of the vertices is set to INITVALUE.
Public Member Functions | |
~EdgePairTemplate ()=default | |
EdgePairTemplate ()=default | |
MAXON_IMPLICIT | EdgePairTemplate (T vA, T vB=INITVALUE) |
EdgePairTemplate (EdgePairTemplate< T, INITVALUE > &&src) | |
MAXON_OPERATOR_COPY_ASSIGNMENT (EdgePairTemplate) | |
EdgePairTemplate (const EdgePairTemplate< T, INITVALUE > &src) | |
HashInt | GetHashCode () const |
UniqueHash | GetUniqueHashCode () const |
String | ToString (const FormatStatement *formatStatement=nullptr) const |
Bool | operator== (const EdgePairTemplate< T, INITVALUE > &b) const |
Bool | operator< (const EdgePairTemplate< T, INITVALUE > &b) const |
Bool | IsValid () const |
Bool | IsCollapsed () const |
MAXON_OPERATOR_COMPARISON (EdgePairTemplate) | |
Static Public Member Functions | |
static constexpr Bool | TriviallyHashable () |
Public Attributes | |
union { | |
T _vA | |
T _vertexA | |
}; | |
union { | |
T _vB | |
T _vertexB | |
}; | |
|
default |
|
default |
MAXON_IMPLICIT EdgePairTemplate | ( | T | vA, |
T | vB = INITVALUE |
||
) |
EdgePairTemplate | ( | EdgePairTemplate< T, INITVALUE > && | src | ) |
EdgePairTemplate | ( | const EdgePairTemplate< T, INITVALUE > & | src | ) |
MAXON_OPERATOR_COPY_ASSIGNMENT | ( | EdgePairTemplate< T, INITVALUE > | ) |
|
staticconstexpr |
HashInt GetHashCode | ( | ) | const |
UniqueHash GetUniqueHashCode | ( | ) | const |
String ToString | ( | const FormatStatement * | formatStatement = nullptr | ) | const |
Bool operator== | ( | const EdgePairTemplate< T, INITVALUE > & | b | ) | const |
Bool operator< | ( | const EdgePairTemplate< T, INITVALUE > & | b | ) | const |
Bool IsValid | ( | ) | const |
Returns true if both vertices have a value != NOTOK.
Bool IsCollapsed | ( | ) | const |
Returns true if the edge is actually a vertex (_vA == _vB).
MAXON_OPERATOR_COMPARISON | ( | EdgePairTemplate< T, INITVALUE > | ) |
T _vA |
T _vertexA |
union { ... } |
First edge vertex, always <= _vB.
T _vB |
T _vertexB |
union { ... } |
Second edge vertex.