Documentation ¶
Index ¶
- func ToSlice[V any](value any) []V
- type Bits
- func (b *Bits[I]) Clear()
- func (b Bits[I]) Clone() IBits[I]
- func (b *Bits[I]) EnsureMax(index I)
- func (b Bits[I]) FirstOn() int32
- func (b Bits[I]) Get(index I) bool
- func (b Bits[I]) IsEmpty() bool
- func (b *Bits[I]) Iterator() Iterator[I]
- func (b Bits[I]) LastOn() int32
- func (b Bits[I]) Max() I
- func (b Bits[I]) OffAfter(index int32) int32
- func (b Bits[I]) OnAfter(index int32) int32
- func (b Bits[I]) Ons() uint32
- func (b *Bits[I]) SafeSet(index I, on bool)
- func (b Bits[I]) SameOnes(a Bits[I]) bool
- func (b *Bits[I]) Set(index I, on bool)
- func (b *Bits[I]) TakeFirst() int32
- func (b *Bits[I]) TakeLast() int32
- type Bits64
- type Bits64Indexed
- func (b Bits64Indexed[I]) All(all Bits64Indexed[I]) bool
- func (b *Bits64Indexed[I]) Clear()
- func (b Bits64Indexed[I]) Clone() IBits[I]
- func (b Bits64Indexed[I]) FirstOn() int32
- func (b *Bits64Indexed[I]) Flip(flip Bits64Indexed[I])
- func (b Bits64Indexed[I]) Get(index I) bool
- func (b Bits64Indexed[I]) IsEmpty() bool
- func (b *Bits64Indexed[I]) Iterator() Iterator[I]
- func (b Bits64Indexed[I]) LastOn() int32
- func (b Bits64Indexed[I]) Max() I
- func (b Bits64Indexed[I]) OffAfter(index int32) int32
- func (b Bits64Indexed[I]) OnAfter(index int32) int32
- func (b Bits64Indexed[I]) Ons() uint32
- func (b *Bits64Indexed[I]) Set(index I, on bool)
- func (b *Bits64Indexed[I]) TakeFirst() int32
- func (b *Bits64Indexed[I]) TakeLast() int32
- type CircularQueue
- func (q *CircularQueue[V]) At(index int) V
- func (q CircularQueue[V]) Cap() int
- func (q *CircularQueue[V]) Clear()
- func (q CircularQueue[V]) IsEmpty() bool
- func (q *CircularQueue[V]) Iterator() Iterator[V]
- func (q CircularQueue[V]) Len() int
- func (q *CircularQueue[V]) Peek() V
- func (q *CircularQueue[V]) Pop() V
- func (q *CircularQueue[V]) Push(value V) bool
- func (q *CircularQueue[V]) RemoveAt(index int)
- type Clearable
- type EnumMap
- func (m EnumMap[K, V]) Empty() bool
- func (m EnumMap[K, V]) Get(key K) (value V)
- func (m EnumMap[K, V]) Has(key K) bool
- func (m EnumMap[K, V]) Len() int
- func (m *EnumMap[K, V]) Merge(other EnumMap[K, V], replace bool, isMissing func(V) bool)
- func (m EnumMap[K, V]) Remove(key K)
- func (m *EnumMap[K, V]) Set(key K, value V)
- type IBits
- type Indexed
- type Iterable
- func NewEmptyIterable[T any]() Iterable[T]
- func NewFilterIterable[T any](iter Iterable[T], filter func(value *T) bool) Iterable[T]
- func NewIterable[T any](create func() Iterator[T]) Iterable[T]
- func NewMapKeyIterable[K comparable, V any](m map[K]V) Iterable[K]
- func NewMapKeyValueIterable[K comparable, V any](m map[K]V) Iterable[MapKeyValue[K, V]]
- func NewMapValueIterable[K comparable, V any](m map[K]V) Iterable[V]
- func NewMultiIterable[T any](iterables []Iterable[T]) Iterable[T]
- func NewSliceIterable[T any](data *[]T) Iterable[T]
- func NewTranslateIterable[T any, S any](iter Iterable[S], translate func(value *S) *T) Iterable[T]
- type Iterator
- func NewEmptyIterator[T any]() Iterator[T]
- func NewFilterIterator[T any](iter Iterator[T], filter func(value *T) bool) Iterator[T]
- func NewMapKeyIterator[K comparable, V any](m map[K]V) Iterator[K]
- func NewMapKeyValueIterator[K comparable, V any](m map[K]V) Iterator[MapKeyValue[K, V]]
- func NewMapValueIterator[K comparable, V any](m map[K]V) Iterator[V]
- func NewMultiIterator[T any](data []Iterator[T]) Iterator[T]
- func NewSliceIterator[T any](data *[]T) Iterator[T]
- func NewTranslateIterator[T any, S any](iter Iterator[S], translate func(value *S) *T) Iterator[T]
- type Linear
- type LinkQueue
- type List
- func (l *List[T]) Add(item T)
- func (l *List[T]) AddList(list List[T])
- func (l *List[T]) Clear()
- func (l *List[T]) Empty() bool
- func (l *List[T]) Get(index int) T
- func (l *List[T]) IndexOf(item T) int
- func (l *List[T]) Iterator() Iterator[T]
- func (l *List[T]) Last() T
- func (l *List[T]) Len() int
- func (l *List[T]) Pad(space int)
- func (l *List[T]) Pop() T
- func (l *List[T]) RemoveAt(index int)
- func (l *List[T]) Reserve(spaces int)
- func (l *List[T]) Swap(i, j int)
- type MapKeyValue
- type Pool
- type PoolCreate
- type PoolPrepare
- type Queue
- type Set
- type Sized
- type Sortable
- type SortableList
- type SparseList
- func (list *SparseList[T]) Add(value T) uint32
- func (list *SparseList[T]) At(index uint32) *T
- func (list *SparseList[T]) Cap() int
- func (list *SparseList[T]) Clear()
- func (list *SparseList[T]) Compress(keepOrder bool, moved func(newIndex uint32, oldIndex uint32, item *T))
- func (list *SparseList[T]) Free(index uint32)
- func (list *SparseList[T]) IsEmpty() bool
- func (list *SparseList[T]) IsFree(index uint32) bool
- func (list *SparseList[T]) Iterate(handle func(item *T, index uint32, liveIndex uint32) bool)
- func (list *SparseList[T]) Iterator() Iterator[T]
- func (list *SparseList[T]) Len() int
- func (list *SparseList[T]) Pointers() []*T
- func (list *SparseList[T]) Remaining() uint32
- func (list *SparseList[T]) Remove(index uint32) uint32
- func (list *SparseList[T]) Size() uint32
- func (list *SparseList[T]) Take() (*T, uint32)
- func (list *SparseList[T]) Values() []T
- type Stack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Bits64 ¶
type Bits64 = Bits64Indexed[uint32]
type Bits64Indexed ¶
type Bits64Indexed[I index] uint64
func (Bits64Indexed[I]) All ¶
func (b Bits64Indexed[I]) All(all Bits64Indexed[I]) bool
func (*Bits64Indexed[I]) Clear ¶
func (b *Bits64Indexed[I]) Clear()
func (Bits64Indexed[I]) Clone ¶
func (b Bits64Indexed[I]) Clone() IBits[I]
func (Bits64Indexed[I]) FirstOn ¶
func (b Bits64Indexed[I]) FirstOn() int32
func (*Bits64Indexed[I]) Flip ¶
func (b *Bits64Indexed[I]) Flip(flip Bits64Indexed[I])
func (Bits64Indexed[I]) Get ¶
func (b Bits64Indexed[I]) Get(index I) bool
func (Bits64Indexed[I]) IsEmpty ¶
func (b Bits64Indexed[I]) IsEmpty() bool
func (*Bits64Indexed[I]) Iterator ¶
func (b *Bits64Indexed[I]) Iterator() Iterator[I]
func (Bits64Indexed[I]) LastOn ¶
func (b Bits64Indexed[I]) LastOn() int32
func (Bits64Indexed[I]) Max ¶
func (b Bits64Indexed[I]) Max() I
func (Bits64Indexed[I]) OffAfter ¶
func (b Bits64Indexed[I]) OffAfter(index int32) int32
func (Bits64Indexed[I]) OnAfter ¶
func (b Bits64Indexed[I]) OnAfter(index int32) int32
func (Bits64Indexed[I]) Ons ¶
func (b Bits64Indexed[I]) Ons() uint32
func (*Bits64Indexed[I]) Set ¶
func (b *Bits64Indexed[I]) Set(index I, on bool)
func (*Bits64Indexed[I]) TakeFirst ¶
func (b *Bits64Indexed[I]) TakeFirst() int32
func (*Bits64Indexed[I]) TakeLast ¶
func (b *Bits64Indexed[I]) TakeLast() int32
type CircularQueue ¶
type CircularQueue[V any] struct { // contains filtered or unexported fields }
func NewCircularQueue ¶
func NewCircularQueue[V any](initialCapacity int) CircularQueue[V]
func (*CircularQueue[V]) At ¶
func (q *CircularQueue[V]) At(index int) V
func (CircularQueue[V]) Cap ¶
func (q CircularQueue[V]) Cap() int
func (*CircularQueue[V]) Clear ¶
func (q *CircularQueue[V]) Clear()
func (CircularQueue[V]) IsEmpty ¶
func (q CircularQueue[V]) IsEmpty() bool
func (*CircularQueue[V]) Iterator ¶
func (q *CircularQueue[V]) Iterator() Iterator[V]
func (CircularQueue[V]) Len ¶
func (q CircularQueue[V]) Len() int
func (*CircularQueue[V]) Peek ¶
func (q *CircularQueue[V]) Peek() V
func (*CircularQueue[V]) Pop ¶
func (q *CircularQueue[V]) Pop() V
func (*CircularQueue[V]) Push ¶
func (q *CircularQueue[V]) Push(value V) bool
func (*CircularQueue[V]) RemoveAt ¶
func (q *CircularQueue[V]) RemoveAt(index int)
type EnumMap ¶
type EnumMap[K constraints.Unsigned, V any] []V
func NewEnumMap ¶
func NewEnumMap[K constraints.Unsigned, V any](m map[K]V) EnumMap[K, V]
type Iterable ¶
func NewEmptyIterable ¶
func NewFilterIterable ¶
func NewIterable ¶
func NewMapKeyIterable ¶
func NewMapKeyIterable[K comparable, V any](m map[K]V) Iterable[K]
func NewMapKeyValueIterable ¶
func NewMapKeyValueIterable[K comparable, V any](m map[K]V) Iterable[MapKeyValue[K, V]]
func NewMapValueIterable ¶
func NewMapValueIterable[K comparable, V any](m map[K]V) Iterable[V]
func NewMultiIterable ¶
func NewSliceIterable ¶
type Iterator ¶
func NewEmptyIterator ¶
func NewFilterIterator ¶
func NewMapKeyIterator ¶
func NewMapKeyIterator[K comparable, V any](m map[K]V) Iterator[K]
func NewMapKeyValueIterator ¶
func NewMapKeyValueIterator[K comparable, V any](m map[K]V) Iterator[MapKeyValue[K, V]]
func NewMapValueIterator ¶
func NewMapValueIterator[K comparable, V any](m map[K]V) Iterator[V]
func NewMultiIterator ¶
func NewSliceIterator ¶
type MapKeyValue ¶
type MapKeyValue[K comparable, V any] struct { Key K Value V // contains filtered or unexported fields }
func (*MapKeyValue[K, V]) Delete ¶
func (kv *MapKeyValue[K, V]) Delete()
func (*MapKeyValue[K, V]) Exists ¶
func (kv *MapKeyValue[K, V]) Exists() bool
func (*MapKeyValue[K, V]) Refresh ¶
func (kv *MapKeyValue[K, V]) Refresh()
func (*MapKeyValue[K, V]) Rekey ¶
func (kv *MapKeyValue[K, V]) Rekey(key K) bool
func (*MapKeyValue[K, V]) Set ¶
func (kv *MapKeyValue[K, V]) Set(value V)
type Pool ¶
type Pool[V any] struct { // contains filtered or unexported fields }
func NewPool ¶
func NewPool[V any](inital int, create PoolCreate[V], prepare PoolPrepare[V]) Pool[V]
type PoolCreate ¶
type PoolCreate[V any] func() V
type PoolPrepare ¶
type PoolPrepare[V any] func(V) V
type Set ¶
type Set[V comparable] map[V]struct{}
type SortableList ¶
func (*SortableList[T]) Less ¶
func (l *SortableList[T]) Less(i, j int) bool
func (*SortableList[T]) Sort ¶
func (l *SortableList[T]) Sort()
type SparseList ¶
type SparseList[T any] struct { // contains filtered or unexported fields }
func NewSparseList ¶
func NewSparseList[T any](capacity uint32) SparseList[T]
func (*SparseList[T]) At ¶
func (list *SparseList[T]) At(index uint32) *T
func (*SparseList[T]) Cap ¶
func (list *SparseList[T]) Cap() int
func (*SparseList[T]) Clear ¶
func (list *SparseList[T]) Clear()
func (*SparseList[T]) Compress ¶
func (list *SparseList[T]) Compress(keepOrder bool, moved func(newIndex uint32, oldIndex uint32, item *T))
func (*SparseList[T]) Free ¶
func (list *SparseList[T]) Free(index uint32)
func (*SparseList[T]) IsEmpty ¶
func (list *SparseList[T]) IsEmpty() bool
func (*SparseList[T]) IsFree ¶
func (list *SparseList[T]) IsFree(index uint32) bool
func (*SparseList[T]) Iterate ¶
func (list *SparseList[T]) Iterate(handle func(item *T, index uint32, liveIndex uint32) bool)
func (*SparseList[T]) Iterator ¶
func (list *SparseList[T]) Iterator() Iterator[T]
func (*SparseList[T]) Len ¶
func (list *SparseList[T]) Len() int
func (*SparseList[T]) Pointers ¶
func (list *SparseList[T]) Pointers() []*T
func (*SparseList[T]) Remaining ¶
func (list *SparseList[T]) Remaining() uint32
func (*SparseList[T]) Remove ¶
func (list *SparseList[T]) Remove(index uint32) uint32
Removes the value at the given index and replaces it with the value at the end of the list and returns the index of that last item.
func (*SparseList[T]) Size ¶
func (list *SparseList[T]) Size() uint32
func (*SparseList[T]) Take ¶
func (list *SparseList[T]) Take() (*T, uint32)
Returns a pointer and the index to a value in the list. The value could be in any state since.
func (*SparseList[T]) Values ¶
func (list *SparseList[T]) Values() []T
Click to show internal directories.
Click to hide internal directories.