std

package
v3.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 11, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterStdPreload

func RegisterStdPreload(v *vm.VM)

Types

type BTree

type BTree[T constraints.Ordered] struct {
	// contains filtered or unexported fields
}

func (*BTree[T]) Delete

func (tree *BTree[T]) Delete(key T)

func (*BTree[T]) Insert

func (tree *BTree[T]) Insert(key T)

func (*BTree[T]) Search

func (tree *BTree[T]) Search(key T) bool

type BTreeNode

type BTreeNode[T constraints.Ordered] struct {
	// contains filtered or unexported fields
}

func NewBTreeNode

func NewBTreeNode[T constraints.Ordered](maxKeys int, isLeaf bool) *BTreeNode[T]

func (*BTreeNode[T]) Append

func (node *BTreeNode[T]) Append(key T, child *BTreeNode[T])

func (*BTreeNode[T]) Concat

func (node *BTreeNode[T]) Concat(other *BTreeNode[T], idx int)

func (*BTreeNode[T]) Delete

func (node *BTreeNode[T]) Delete(tree *BTree[T], key T)

func (*BTreeNode[T]) DeleteIthKey

func (node *BTreeNode[T]) DeleteIthKey(i int)

func (*BTreeNode[T]) InsertKeyChild

func (node *BTreeNode[T]) InsertKeyChild(key T, child *BTreeNode[T])

func (*BTreeNode[T]) InsertNonFull

func (node *BTreeNode[T]) InsertNonFull(tree *BTree[T], key T)

func (*BTreeNode[T]) IsFull

func (node *BTreeNode[T]) IsFull(maxKeys int) bool

func (*BTreeNode[T]) Max

func (node *BTreeNode[T]) Max() T

func (*BTreeNode[T]) Merge

func (node *BTreeNode[T]) Merge(idx int)

func (*BTreeNode[T]) Min

func (node *BTreeNode[T]) Min() T

func (*BTreeNode[T]) Search

func (node *BTreeNode[T]) Search(key T) bool

func (*BTreeNode[T]) Split

func (parent *BTreeNode[T]) Split(idx int, maxKeys int)

func (*BTreeNode[T]) Verify

func (node *BTreeNode[T]) Verify(tree *BTree[T])

type Deque

type Deque struct {
	// contains filtered or unexported fields
}

func NewDeque

func NewDeque() *Deque

func (*Deque) Back

func (d *Deque) Back() (any, bool)

func (*Deque) Clear

func (d *Deque) Clear()

func (*Deque) Empty

func (d *Deque) Empty() bool

func (*Deque) Front

func (d *Deque) Front() (any, bool)

func (*Deque) PopBack

func (d *Deque) PopBack() (any, bool)

func (*Deque) PopFront

func (d *Deque) PopFront() (any, bool)

func (*Deque) PushBack

func (d *Deque) PushBack(v any)

func (*Deque) PushFront

func (d *Deque) PushFront(v any)

func (*Deque) Size

func (d *Deque) Size() int

type HashMap

type HashMap struct {
	// contains filtered or unexported fields
}

func DefaultHashMap

func DefaultHashMap() *HashMap

func (*HashMap) Contains

func (hm *HashMap) Contains(key any) bool

func (*HashMap) Get

func (hm *HashMap) Get(key any) any

func (*HashMap) Put

func (hm *HashMap) Put(key, value any)

type Heap

type Heap[T any] struct {
	// contains filtered or unexported fields
}

func NewAny

func NewAny[T any](less func(a, b T) bool) (*Heap[T], error)

func (*Heap[T]) Empty

func (h *Heap[T]) Empty() bool

func (*Heap[T]) Pop

func (h *Heap[T]) Pop()

func (*Heap[T]) Push

func (h *Heap[T]) Push(t T)

func (*Heap[T]) Size

func (h *Heap[T]) Size() int

func (*Heap[T]) Top

func (h *Heap[T]) Top() T

type LinkedList

type LinkedList struct {
	// contains filtered or unexported fields
}

func NewLinkedList

func NewLinkedList() *LinkedList

func (*LinkedList) Back

func (l *LinkedList) Back() (any, bool)

func (*LinkedList) Clear

func (l *LinkedList) Clear()

func (*LinkedList) Empty

func (l *LinkedList) Empty() bool

func (*LinkedList) Front

func (l *LinkedList) Front() (any, bool)

func (*LinkedList) PopBack

func (l *LinkedList) PopBack() (any, bool)

func (*LinkedList) PopFront

func (l *LinkedList) PopFront() (any, bool)

func (*LinkedList) PushBack

func (l *LinkedList) PushBack(v any)

func (*LinkedList) PushFront

func (l *LinkedList) PushFront(v any)

func (*LinkedList) Size

func (l *LinkedList) Size() int

func (*LinkedList) ToArray

func (l *LinkedList) ToArray() []any

type Node

type Node struct {
	// contains filtered or unexported fields
}

func NewNode

func NewNode() *Node

func (*Node) Capacity

func (n *Node) Capacity() int

func (*Node) Compact

func (n *Node) Compact() (remove bool)

func (*Node) Find

func (n *Node) Find(s string) bool

func (*Node) Insert

func (n *Node) Insert(s ...string)

func (*Node) Remove

func (n *Node) Remove(s ...string)

func (*Node) Size

func (n *Node) Size() int

type Queue

type Queue struct {
	// contains filtered or unexported fields
}

func NewQueue

func NewQueue() *Queue

func (*Queue) Clear

func (q *Queue) Clear()

func (*Queue) Empty

func (q *Queue) Empty() bool

func (*Queue) Peek

func (q *Queue) Peek() (any, bool)

func (*Queue) Pop

func (q *Queue) Pop() (any, bool)

func (*Queue) Push

func (q *Queue) Push(v any)

func (*Queue) Size

func (q *Queue) Size() int

type Set

type Set struct {
	// contains filtered or unexported fields
}

func NewSet

func NewSet() *Set

func (*Set) Add

func (s *Set) Add(v any) bool

func (*Set) Clear

func (s *Set) Clear()

func (*Set) Contains

func (s *Set) Contains(v any) bool

func (*Set) Empty

func (s *Set) Empty() bool

func (*Set) Remove

func (s *Set) Remove(v any) bool

func (*Set) Size

func (s *Set) Size() int

func (*Set) Values

func (s *Set) Values() []any

type Stack

type Stack struct {
	// contains filtered or unexported fields
}

func NewStack

func NewStack() *Stack

func (*Stack) Clear

func (s *Stack) Clear()

func (*Stack) Empty

func (s *Stack) Empty() bool

func (*Stack) Peek

func (s *Stack) Peek() (any, bool)

func (*Stack) Pop

func (s *Stack) Pop() (any, bool)

func (*Stack) Push

func (s *Stack) Push(v any)

func (*Stack) Size

func (s *Stack) Size() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL