Documentation ¶
Index ¶
- type Area
- func (a *Area[From, To]) Clear()
- func (a Area[From, To]) Empty() bool
- func (a Area[From, To]) Has(from From) bool
- func (a Area[From, To]) Len() int
- func (a *Area[From, To]) Peek(from From) int
- func (a *Area[From, To]) Remove(from From, maintainOrder bool) int
- func (a *Area[From, To]) Translate(from From) To
- type DenseKeyMap
- func (m *DenseKeyMap[V, A, L]) Clear()
- func (m DenseKeyMap[V, A, L]) Empty() bool
- func (m *DenseKeyMap[V, A, L]) Get(key Identifier) V
- func (m *DenseKeyMap[V, A, L]) Has(key Identifier) bool
- func (m DenseKeyMap[V, A, L]) Keys() []Identifier
- func (m DenseKeyMap[V, A, L]) Len() int
- func (m *DenseKeyMap[V, A, L]) Merge(other DenseKeyMap[V, A, L], replace bool, isMissing func(V) bool)
- func (m *DenseKeyMap[V, A, L]) Ptr(key Identifier) *V
- func (m *DenseKeyMap[V, A, L]) Remove(key Identifier, maintainOrder bool) bool
- func (m *DenseKeyMap[V, A, L]) Set(key Identifier, value V)
- func (m *DenseKeyMap[V, A, L]) SetKeyValues(kv []KeyValue[V])
- func (s *DenseKeyMap[V, A, L]) SetMap(m map[Identifier]V)
- func (s *DenseKeyMap[V, A, L]) SetStringMap(m map[string]V)
- func (m *DenseKeyMap[V, A, L]) Take(key Identifier) *V
- func (m DenseKeyMap[V, A, L]) Values() []V
- type DenseMap
- func (m *DenseMap[V, A, L]) Clear()
- func (m DenseMap[V, A, L]) Empty() bool
- func (m *DenseMap[V, A, L]) Get(key Identifier) V
- func (m *DenseMap[V, A, L]) Has(key Identifier) bool
- func (m DenseMap[V, A, L]) Len() int
- func (m *DenseMap[V, A, L]) Ptr(key Identifier) *V
- func (m *DenseMap[V, A, L]) Remove(key Identifier, maintainOrder bool) bool
- func (m *DenseMap[V, A, L]) Set(key Identifier, value V)
- func (m *DenseMap[V, A, L]) SetKeyValues(kv []KeyValue[V])
- func (s *DenseMap[V, A, L]) SetMap(m map[Identifier]V)
- func (s *DenseMap[V, A, L]) SetStringMap(m map[string]V)
- func (m *DenseMap[V, A, L]) Take(key Identifier) *V
- func (m DenseMap[V, A, L]) Values() []V
- type HasArea
- type HasCapacity
- type HasResizeBuffer
- type HasSet
- type Identifier
- type KeyValue
- type LargeArea
- type MediumArea
- type Option
- type SmallArea
- type SparseMap
- func (m SparseMap[V, SID]) Empty() bool
- func (m *SparseMap[V, SID]) Get(key Identifier) V
- func (m *SparseMap[V, SID]) Has(key Identifier) bool
- func (m SparseMap[V, SID]) Len() int
- func (m *SparseMap[V, SID]) Ptr(key Identifier) *V
- func (m *SparseMap[V, SID]) Set(key Identifier, value V)
- func (m *SparseMap[V, SID]) SetKeyValues(kv []KeyValue[V])
- func (s *SparseMap[V, SID]) SetMap(m map[Identifier]V)
- func (s *SparseMap[V, SID]) SetStringMap(m map[string]V)
- func (m *SparseMap[V, SID]) Take(key Identifier) *V
- func (m SparseMap[V, SID]) Values() []V
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Area ¶
type Area[From constraints.Unsigned, To constraints.Unsigned] struct { // contains filtered or unexported fields }
func NewArea ¶
func NewArea[From constraints.Unsigned, To constraints.Unsigned](opts ...Option) *Area[From, To]
type DenseKeyMap ¶
type DenseKeyMap[V any, A constraints.Unsigned, L constraints.Unsigned] struct { // contains filtered or unexported fields }
func NewDenseKeyMap ¶
func NewDenseKeyMap[V any, A constraints.Unsigned, L constraints.Unsigned](opts ...Option) DenseKeyMap[V, A, L]
func (*DenseKeyMap[V, A, L]) Clear ¶
func (m *DenseKeyMap[V, A, L]) Clear()
func (DenseKeyMap[V, A, L]) Empty ¶
func (m DenseKeyMap[V, A, L]) Empty() bool
func (*DenseKeyMap[V, A, L]) Get ¶
func (m *DenseKeyMap[V, A, L]) Get(key Identifier) V
func (*DenseKeyMap[V, A, L]) Has ¶
func (m *DenseKeyMap[V, A, L]) Has(key Identifier) bool
func (DenseKeyMap[V, A, L]) Keys ¶
func (m DenseKeyMap[V, A, L]) Keys() []Identifier
func (DenseKeyMap[V, A, L]) Len ¶
func (m DenseKeyMap[V, A, L]) Len() int
func (*DenseKeyMap[V, A, L]) Merge ¶
func (m *DenseKeyMap[V, A, L]) Merge(other DenseKeyMap[V, A, L], replace bool, isMissing func(V) bool)
func (*DenseKeyMap[V, A, L]) Ptr ¶
func (m *DenseKeyMap[V, A, L]) Ptr(key Identifier) *V
func (*DenseKeyMap[V, A, L]) Remove ¶
func (m *DenseKeyMap[V, A, L]) Remove(key Identifier, maintainOrder bool) bool
func (*DenseKeyMap[V, A, L]) Set ¶
func (m *DenseKeyMap[V, A, L]) Set(key Identifier, value V)
func (*DenseKeyMap[V, A, L]) SetKeyValues ¶
func (m *DenseKeyMap[V, A, L]) SetKeyValues(kv []KeyValue[V])
func (*DenseKeyMap[V, A, L]) SetMap ¶
func (s *DenseKeyMap[V, A, L]) SetMap(m map[Identifier]V)
func (*DenseKeyMap[V, A, L]) SetStringMap ¶
func (s *DenseKeyMap[V, A, L]) SetStringMap(m map[string]V)
func (*DenseKeyMap[V, A, L]) Take ¶
func (m *DenseKeyMap[V, A, L]) Take(key Identifier) *V
func (DenseKeyMap[V, A, L]) Values ¶
func (m DenseKeyMap[V, A, L]) Values() []V
type DenseMap ¶
type DenseMap[V any, A constraints.Unsigned, L constraints.Unsigned] struct { // contains filtered or unexported fields }
func NewDenseMap ¶
func NewDenseMap[V any, A constraints.Unsigned, L constraints.Unsigned](opts ...Option) DenseMap[V, A, L]
func (*DenseMap[V, A, L]) Get ¶
func (m *DenseMap[V, A, L]) Get(key Identifier) V
func (*DenseMap[V, A, L]) Has ¶
func (m *DenseMap[V, A, L]) Has(key Identifier) bool
func (*DenseMap[V, A, L]) Ptr ¶
func (m *DenseMap[V, A, L]) Ptr(key Identifier) *V
func (*DenseMap[V, A, L]) Remove ¶
func (m *DenseMap[V, A, L]) Remove(key Identifier, maintainOrder bool) bool
func (*DenseMap[V, A, L]) Set ¶
func (m *DenseMap[V, A, L]) Set(key Identifier, value V)
func (*DenseMap[V, A, L]) SetKeyValues ¶
func (*DenseMap[V, A, L]) SetMap ¶
func (s *DenseMap[V, A, L]) SetMap(m map[Identifier]V)
func (*DenseMap[V, A, L]) SetStringMap ¶
func (*DenseMap[V, A, L]) Take ¶
func (m *DenseMap[V, A, L]) Take(key Identifier) *V
type HasCapacity ¶
type HasCapacity interface {
// contains filtered or unexported methods
}
type HasResizeBuffer ¶
type HasResizeBuffer interface {
// contains filtered or unexported methods
}
type HasSet ¶
type HasSet[V any] interface { Set(key Identifier, value V) }
type Identifier ¶
type Identifier int32
const ( None Identifier = -1 Empty Identifier = 0 )
func Lower ¶
func Lower(s string) Identifier
Returns the identifier for the lowercase version of the given string.
func Maybe ¶
func Maybe(s string) Identifier
Returns an identifier and if the string has not been added as one then -1 is returned.
func (Identifier) Empty ¶
func (i Identifier) Empty() bool
func (Identifier) Exists ¶
func (i Identifier) Exists() bool
func (Identifier) String ¶
func (i Identifier) String() string
type KeyValue ¶
type KeyValue[V any] struct { Key Identifier Value V }
type MediumArea ¶
type Option ¶
type Option func(optionable any)
func WithCapacity ¶
func WithKeyValues ¶
func WithMap ¶
func WithMap[V any](m map[Identifier]V) Option
func WithResizeBuffer ¶
func WithStringMap ¶
type SparseMap ¶
type SparseMap[V any, SID constraints.Unsigned] struct { // contains filtered or unexported fields }
func NewSparseMap ¶
func NewSparseMap[V any, SID constraints.Unsigned](opts ...Option) SparseMap[V, SID]
func (*SparseMap[V, SID]) Get ¶
func (m *SparseMap[V, SID]) Get(key Identifier) V
func (*SparseMap[V, SID]) Has ¶
func (m *SparseMap[V, SID]) Has(key Identifier) bool
func (*SparseMap[V, SID]) Ptr ¶
func (m *SparseMap[V, SID]) Ptr(key Identifier) *V
func (*SparseMap[V, SID]) Set ¶
func (m *SparseMap[V, SID]) Set(key Identifier, value V)
func (*SparseMap[V, SID]) SetKeyValues ¶
func (*SparseMap[V, SID]) SetMap ¶
func (s *SparseMap[V, SID]) SetMap(m map[Identifier]V)
func (*SparseMap[V, SID]) SetStringMap ¶
func (*SparseMap[V, SID]) Take ¶
func (m *SparseMap[V, SID]) Take(key Identifier) *V
Click to show internal directories.
Click to hide internal directories.