C++ Reference: class Set

Note: This documentation is automatically generated.

Method
AddElement

Return type: Set

Arguments: int n

Returns a set equal to the calling object, with element n added. If n is already in the set, no operation occurs.

begin

Return type: ElementIterator<Set>

STL iterator-related member functions.

Cardinality

Return type: int

Returns the number of elements in the set. Uses the 32-bit version for types that have 32-bits or less. Specialized for uint64_t.

Contains

Return type: bool

Arguments: int n

Returns true if the calling set contains element n.

ElementRank

Return type: int

Arguments: int n

Returns the rank of an element in a set. For the set 11100, ElementRank(4) would return 2. (Ranks start at zero).

end

Return type: ElementIterator<Set>

FullSet

Return type: static Set

Arguments: Integer card

Includes

Return type: bool

Arguments: Set other

Returns true if 'other' is included in the calling set.

RemoveElement

Return type: Set

Arguments: int n

Returns a set equal to the calling object, with element n removed. If n is not in the set, no operation occurs.

RemoveSmallestElement

Return type: Set

Returns a set equal to the calling object, with its smallest element removed.

Set

Return type: explicit

Arguments: Integer n

Construct a set from an Integer.

Singleton

Return type: static Set

Arguments: Integer n

Returns the singleton set with 'n' as its only element.

SingletonRank

Return type: int

Arguments: Set singleton

Returns the rank of the singleton's element in the calling Set.

SmallestElement

Return type: int

Returns the index of the smallest element in the set. Uses the 32-bit version for types that have 32-bits or less. Specialized for uint64_t.

SmallestSingleton

Return type: Set

Returns the set consisting of the smallest element of the calling object.

value

Return type: Integer

Returns the integer corresponding to the set.