Operators | |
typedef opIn_r | opIndex |
Implementation of this[elem]. | |
deprecated typedef opIn_r | contains |
intBool | opEquals (Object o) |
Determines whether this set is equal to another. | |
bool | opIndexAssign (bool b, T elem) |
Adds or removes an element to or from the set. | |
Set | opAnd (Set s) |
Returns the intersection of this set and s. | |
Set | opOr (Set s) |
Returns the union of this set and s. | |
Set | opSub (Set s) |
Returns a set containing the elements of this set that are not in s. | |
Set | opXor (Set s) |
Returns the symmetric difference between this set and s. | |
Set | opAnd (bool public(*dg)(T)) |
Returns a set containing the elements of this set that for which dg returns true. | |
Set | opSub (bool public(*dg)(T)) |
Returns a set containing the elements of this set that for which dg returns false. | |
Set | opAndAssign (Set s) |
Removes from this set those elements that are not in s. | |
Set | opOrAssign (Set s) |
Adds to this set the elements of s. | |
Set | opSubAssign (Set s) |
Removes from this set the elements of s. | |
Set | opXorAssign (Set s) |
Toggles the presence in this set of each of the elements of s. | |
Set | opAndAssign (bool public(*dg)(T)) |
Removes from this set the elements for which dg returns false. | |
Set | opSubAssign (bool public(*dg)(T)) |
Removes from this set the elements for which dg returns true. | |
Public Member Functions | |
abstract void | add (T elem) |
Adds an element to the set. | |
abstract void | remove (T elem) |
Removes an element from the set. | |
abstract void | removeCurrent () |
Removes the element currently active in the innermost active foreach loop on this set. | |
bool | subsetOf (Set s) |
Determines whether this set is a subset of another. | |
Set | remove (bool public(*dg)(T)) |
Removes from this set all elements for which dg returns true, and returns a set of the elements removed. | |
Set | remove (Set s) |
Removes from this set all elements that are in s, and returns a set of the elements removed. | |
Properties | |
abstract size_t | length () |
Returns the number of elements in the set. | |
abstract Set | dup () |
Returns an exact copy of this set. | |
abstract T[] | data () |
Returns an array of the set's elements. | |
Operators | |
abstract bool | opIn_r (T elem) |
Determines whether the set contains the given element. | |
abstract int | opApply (int public abstract(*dg)(inout T)) |
Iterates over the elements of the set. | |
Properties | |
string | toString () |
Returns a string representation of this set. | |
hash_t | toHash () |
Returns the hash value of this set. |
Default implementations of several methods are given. These may be overridden to provide an implementation optimised to the internal data structure used by the specific set implementation.
typedef opIn_r smjg.libs.util.setbase.Set< T >.Set.opIndex |
Implementation of this[elem].
abstract void smjg.libs.util.setbase.Set< T >.Set.add | ( | T | elem | ) | [pure virtual] |
Adds an element to the set.
elem | the element to add. |
abstract void smjg.libs.util.setbase.Set< T >.Set.remove | ( | T | elem | ) | [pure virtual] |
Removes an element from the set.
elem | the element to remove. |
abstract void smjg.libs.util.setbase.Set< T >.Set.removeCurrent | ( | ) | [pure virtual] |
Removes the element currently active in the innermost active foreach loop on this set.
abstract size_t smjg.libs.util.setbase.Set< T >.Set.length | ( | ) | [pure virtual] |
Returns the number of elements in the set.
abstract Set smjg.libs.util.setbase.Set< T >.Set.dup | ( | ) | [pure virtual] |
Returns an exact copy of this set.
abstract T [] smjg.libs.util.setbase.Set< T >.Set.data | ( | ) | [pure virtual] |
Returns an array of the set's elements.
abstract bool smjg.libs.util.setbase.Set< T >.Set.opIn_r | ( | T | elem | ) | [pure virtual] |
Determines whether the set contains the given element.
(Implementation of T in this.)
elem | element to look up. |
abstract int smjg.libs.util.setbase.Set< T >.Set.opApply | ( | int public abstract(*)(inout T) | dg | ) | [pure virtual] |
Iterates over the elements of the set.
(Implementation of foreach(T; this).)
Modifying the set while foreach is in progress, except by the removeCurrent method, may lead to undefined behaviour.
bool smjg.libs.util.setbase.Set< T >.Set.subsetOf | ( | Set< T > | s | ) |
Determines whether this set is a subset of another.
s | set of which this may or may not be a subset. |
Set smjg.libs.util.setbase.Set< T >.Set.remove | ( | bool public(*)(T) | dg | ) |
Removes from this set all elements for which dg returns true, and returns a set of the elements removed.
Set smjg.libs.util.setbase.Set< T >.Set.remove | ( | Set< T > | s | ) |
Removes from this set all elements that are in s, and returns a set of the elements removed.
string smjg.libs.util.setbase.Set< T >.Set.toString | ( | ) |
Returns a string representation of this set.
hash_t smjg.libs.util.setbase.Set< T >.Set.toHash | ( | ) |
Returns the hash value of this set.
intBool smjg.libs.util.setbase.Set< T >.Set.opEquals | ( | Object | o | ) |
Determines whether this set is equal to another.
bool smjg.libs.util.setbase.Set< T >.Set.opIndexAssign | ( | bool | b, | |
T | elem | |||
) |
Adds or removes an element to or from the set.
(Implementation of this[elem] = b.)
elem | the element to add or remove. | |
b | true to add the element, or false to remove it. |
Set smjg.libs.util.setbase.Set< T >.Set.opAnd | ( | Set< T > | s | ) |
Returns the intersection of this set and s.
Set smjg.libs.util.setbase.Set< T >.Set.opOr | ( | Set< T > | s | ) |
Returns the union of this set and s.
Set smjg.libs.util.setbase.Set< T >.Set.opSub | ( | Set< T > | s | ) |
Returns a set containing the elements of this set that are not in s.
Set smjg.libs.util.setbase.Set< T >.Set.opXor | ( | Set< T > | s | ) |
Returns the symmetric difference between this set and s.
Set smjg.libs.util.setbase.Set< T >.Set.opAnd | ( | bool public(*)(T) | dg | ) |
Returns a set containing the elements of this set that for which dg returns true.
Set smjg.libs.util.setbase.Set< T >.Set.opSub | ( | bool public(*)(T) | dg | ) |
Returns a set containing the elements of this set that for which dg returns false.
Set smjg.libs.util.setbase.Set< T >.Set.opAndAssign | ( | Set< T > | s | ) |
Removes from this set those elements that are not in s.
Set smjg.libs.util.setbase.Set< T >.Set.opOrAssign | ( | Set< T > | s | ) |
Adds to this set the elements of s.
Set smjg.libs.util.setbase.Set< T >.Set.opSubAssign | ( | Set< T > | s | ) |
Removes from this set the elements of s.
Set smjg.libs.util.setbase.Set< T >.Set.opXorAssign | ( | Set< T > | s | ) |
Toggles the presence in this set of each of the elements of s.
Set smjg.libs.util.setbase.Set< T >.Set.opAndAssign | ( | bool public(*)(T) | dg | ) |
Removes from this set the elements for which dg returns false.
Set smjg.libs.util.setbase.Set< T >.Set.opSubAssign | ( | bool public(*)(T) | dg | ) |
Removes from this set the elements for which dg returns true.
deprecated typedef opIn_r smjg.libs.util.setbase.Set< T >.Set.contains |