Class ADT.Set (< ValueType >)
- Description
ADT.Set implements a datatype for sets. These sets behave much like multisets, except that they are restricted to containing only one instance of each member value.
From a performance viewpoint, it is probably more efficient for a Pike program to use mappings to serve as sets, rather than using an ADT.Set,so ADT.Set is mainly provided for the sake of completeness and code readability.
- Generic
ValueType
__generic__
mixed
ValueType
=mixed
- Description
Type for the individual members of the set.
- Method
create
ADT.Set ADT.Set(
void
|ADT.Set
|array
(
)|ValueType
multiset
(
)|ValueType
mapping
(
:ValueType
mixed
)initial_data
)- Description
Create an ADT.Set, optionally initialized from another ADT.Set or a compatible type. If no initial data is given, the set will start out empty.