|
smats
0.0.1
Satisfability Modulo Arithmetic Theories Symbols
|
#include <variables.h>
Public Types | |
using | size_type = std::set<Variable>::size_type |
using | iterator = std::set<Variable>::iterator |
using | const_iterator = std::set<Variable>::const_iterator |
using | reverse_iterator = std::set<Variable>::reverse_iterator |
using | const_reverse_iterator = std::set<Variable>::const_reverse_iterator |
Public Member Functions | |
Variables ()=default | |
Variables (std::initializer_list< Variable > init) | |
size_type | size () const |
bool | empty () const |
void | hash (InvocableHashAlgorithm auto &hasher) const noexcept |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
const_iterator | cbegin () const |
const_iterator | cend () const |
reverse_iterator | rbegin () |
reverse_iterator | rend () |
const_reverse_iterator | rbegin () const |
const_reverse_iterator | rend () const |
const_reverse_iterator | crbegin () const |
const_reverse_iterator | crend () const |
void | insert (const Variable &var) |
template<class InputIt > | |
void | insert (InputIt first, InputIt last) |
void | insert (const Variables &vars) |
size_type | erase (const Variable &key) |
size_type | erase (const Variables &vars) |
iterator | find (const Variable &key) |
const_iterator | find (const Variable &key) const |
bool | contains (const Variable &key) const |
bool | is_subset_of (const Variables &vars) const |
bool | is_superset_of (const Variables &vars) const |
bool | is_strict_subset_of (const Variables &vars) const |
bool | is_strict_superset_of (const Variables &vars) const |
bool | operator== (const Variables &vars) const |
bool | operator< (const Variables &vars) const |
Variables & | operator+= (const Variables &vars) |
Variables & | operator+= (const Variable &var) |
Variables & | operator-= (const Variables &vars) |
Variables & | operator-= (const Variable &var) |
Variables | operator+ (const Variables &vars) const |
Variables | operator+ (const Variable &var) const |
Variables | operator- (const Variables &vars) const |
Variables | operator- (const Variable &var) const |
Variables | intersect (const Variables &vars) const |
Private Member Functions | |
Variables (std::set< Variable > vars) | |
Private Attributes | |
std::set< Variable > | vars_ |
Set of variables. | |
Represents a set of variables.
This class is based on std::set<Variable>, with the addition of some utilities such as set-union (Variables::insert, operator+, operator+=), set-minus (Variables::erase, operator-, operator-=) and subset/superset checking functions (Variables::IsSubsetOf, Variables::IsSupersetOf, Variables::IsStrictSubsetOf, Variables::IsStrictSupersetOf).
|
default |
Construct a new Variables object.
smats::Variables::Variables | ( | std::initializer_list< Variable > | init | ) |
Construct a new Variables object initialized with a list of variables.
init | initializer list of variables |
|
explicitprivate |
Construct a new Variables object from a set of variables.
vars | set of variables |
|
inline |
Get read-only access to the iterator to the beginning of the set.
|
inlinenodiscard |
Get read-only access to the const iterator to the beginning of the set.
|
inlinenodiscard |
Get read-only access to the const iterator to the beginning of the set.
|
inlinenodiscard |
Get read-only access to the const iterator to the end of the set.
|
inlinenodiscard |
Check whether the variable key
is contained in the set.
key | variable to check |
key
is contained in the set key
is not contained in the set
|
inlinenodiscard |
Get read-only access to the reverse const iterator to the beginning of the set.
|
inlinenodiscard |
Get read-only access to the reverse const iterator to the end of the set.
|
inlinenodiscard |
Check whether the set is empty.
|
inline |
Get read-only access to the iterator to the end of the set.
|
inlinenodiscard |
Get read-only access to the const iterator to the end of the set.
|
inline |
Erases key
from a set. Return number of erased elements (0 or 1).
key | variable to erase |
Variables::size_type smats::Variables::erase | ( | const Variables & | vars | ) |
Erases variables in vars
from a set. Return number of erased elements ([0, vars.size()]).
vars | set of variables |
|
inline |
Finds element with specific key.
key | variable to find |
key
|
inlinenodiscard |
Finds element with specific key.
key | variable to find |
key
|
inlinenoexcept |
Compute the hash of this variables using the given hasher
InvocableHashAlgorithm | type of the hash algorithm to use |
hasher | hash algorithm to use |
|
inline |
Inserts a variable var
into a set.
var | variable to insert |
|
inline |
Inserts variables in vars
into a set.
vars | set of variables |
|
inline |
Inserts variables in the range [first, last) into a set.
InputIt | type of the iterator |
first | iterator to the beginning |
Return the intersection of two sets of variables.
vars | set of variables |
|
nodiscard |
Check whether the this set of variables is strict subset of vars
.
vars | variable set to compare against |
vars
vars
|
nodiscard |
Check whether the this set of variables is strict superset of vars
.
vars | variable set to compare against |
vars
vars
|
nodiscard |
Check whether the this set of variables is subset of vars
.
vars | variable set to compare against |
vars
vars
|
nodiscard |
Check whether the this set of variables is superset of vars
.
vars | variable set to compare against |
vars
vars
|
inline |
Get read-only access to the reverse iterator to the beginning of the set.
|
inlinenodiscard |
Get read-only access to the reverse const iterator to the beginning of the set.
|
inline |
Get read-only access to the reverse iterator to the end of the set.
|
inlinenodiscard |
Get read-only access to the reverse const iterator to the end of the set.
|
inlinenodiscard |
Get read-only access to the number of variables of the set.