#include <ncompconstraint.h>
Public Member Functions | |
NCompConstraintSet () | |
Creates a new empty constraint set. | |
~NCompConstraintSet () | |
Destroys this constraint set. | |
template<class T> | |
bool | isSatisfied (const NVector< T > &first, const NVector< T > &second) const |
Determines whether the given pair of vectors satisfies every constraint in this set. | |
template<class T> | |
bool | isSatisfied (const NVector< T > &v) const |
Determines whether the given vector satisfies every constraint in this set. |
A compatibility constraint set represents a set of necessary and sufficient conditions for two valid vectors to be compatible. See class NCompConstraint for details on the concept of compatibility.
regina::NCompConstraintSet::NCompConstraintSet | ( | ) | [inline] |
Creates a new empty constraint set.
regina::NCompConstraintSet::~NCompConstraintSet | ( | ) | [inline] |
Destroys this constraint set.
All individual constraints belonging to this set will be deallocated.
bool regina::NCompConstraintSet::isSatisfied | ( | const NVector< T > & | first, | |
const NVector< T > & | second | |||
) | const [inline] |
Determines whether the given pair of vectors satisfies every constraint in this set.
first | the first of the two vectors to examine. | |
second | the second of the two vectors to examine. |
true
if the given pair of vectors satisfies every constraint in this set, or false
if some constraint is not satisfied. bool regina::NCompConstraintSet::isSatisfied | ( | const NVector< T > & | v | ) | const [inline] |
Determines whether the given vector satisfies every constraint in this set.
Although constraints are defined in terms of pairs of vectors, a single vector can also be said to satisfy a constraint if the number of non-zero coordinates amongst the given set of coordinate positions is at most the given maximum.
Examining whether a single vector v satisfies a constraint is equivalent to deciding whether the pair (v, v) or equivalently the pair (v, 0) satisfies the constraint.
v | the vector to examine. |
true
if the given vector satisfies every constraint in this set, or false
if some constraint is not satisfied.