Set
Parameters
[DType = Dynamic, Hasher = MurMur3Hasher]
Implements an ordered Hashtable using the provided Hasher. The order of insertion of items is preserved and items can be iterated bidirectionally from the beginning to the end and vice versa.
graph BT
N1["Set[DType,Hasher]"] -->|inherits| N2["ReverseIterable[DType]"];
N1["Set[DType,Hasher]"] -->|inherits| N3["Unpackable[DType]"];
Characteristics
Quality | Value |
---|---|
Inherits | ReverseIterable[DType], Unpackable[DType] |
Extends | N/A |
Decorators | #sealed; |
Is enum | false |
Is sealed | true |
Is extern | false |
Type Aliases
ListData
ListData = Pair[Hasher.HashValueType, DType]
Methods
construct
construct (s Self) -> Self
init
init (s Self) -> Nil
get_iterator
get_iterator (s Self) -> DictIterator[Self]
get_reverse_iterator
get_reverse_iterator (s Self) -> DictIterator[Self]
len
#strict
len (s Self) -> Len
copy
copy (s Self) -> strictly SelfType
add
add (s Self, item @DType) -> Nil
remove
remove (s Self, item @DType) -> Nil
first
first (s Self) -> DType?
last
last (s Self) -> DType?
pop
pop (s Self) -> DType?
str
str (s Self, delimiter: String = `, `, quote_begin: String = ```, quote_end: String = ```, enclose_begin: String = `[`, enclose_end: String = `]`) -> String
__erase
__erase (s Self, index Len, list_ptr Pointer) -> Nil
__calculate_index
#Gambol.function.alwaysinline
__calculate_index (s Self, hash_value Hasher.HashValueType) -> Len
__grow_if_necessary
__grow_if_necessary (s Self) -> Nil
Binary Operators
is in
is in (s Self, item DType) -> Bool
item
is in the set. false otherwise
==
== (s Self, o Self) -> Bool
<=
<= (s Self, o Self) -> Bool
o
<
< (s Self, o Self) -> Bool
o
>=
>= (s Self, o Self) -> Bool
o
is a subset of this set
>
> (s Self, o Self) -> Bool
o
is a proper subset of this set
|
| (s Self, o Self) -> strictly SelfType
o
|=
|= (s Self, o Self) -> Self
o
to this set
&
& (s Self, o Self) -> strictly SelfType
o
&=
&= (s Self, o Self) -> Self
o
-
- (s Self, o Self) -> SelfType
o
removed
-=
-= (s Self, o Self) -> Self
o
from this set
^
^ (s Self, o Self) -> SelfType
o
^=
^= (s Self, o Self) -> Self
o
that don't exist in this set to this set simultaneously
Properties
kInitSize
const global kInitSize Len = 64
kGrowthFactor
const global kGrowthFactor Len = 3
__table
__table List[Pointer](kInitSize)
__len
__len Len
__load
__load Len
__first_ptr
__first_ptr Pointer
__last_ptr
__last_ptr Pointer