node

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ID

type ID string

type IDSet

type IDSet map[ID]struct{}

func NewIDSet

func NewIDSet(is ...ID) IDSet

func (IDSet) Add

func (s IDSet) Add(ids ...ID)

func (IDSet) Clear

func (s IDSet) Clear()

func (IDSet) Contains

func (s IDSet) Contains(i ID) bool

func (IDSet) ContainsAny

func (s IDSet) ContainsAny(ids ...ID) bool

func (IDSet) List

func (s IDSet) List() []ID

func (IDSet) Merge

func (s IDSet) Merge(other IDSet)

func (IDSet) Remove

func (s IDSet) Remove(ids ...ID)

func (IDSet) Size

func (s IDSet) Size() int

func (IDSet) Sorted

func (s IDSet) Sorted() []ID

type Node

type Node interface {
	ID() ID
	Copy() Node
}

type Nodes

type Nodes []Node

func (Nodes) Equal

func (n Nodes) Equal(other Nodes) bool

func (Nodes) Len

func (n Nodes) Len() int

func (Nodes) Less

func (n Nodes) Less(idx1, idx2 int) bool

func (Nodes) Swap

func (n Nodes) Swap(idx1, idx2 int)

type Queue

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

func (*Queue) Dequeue

func (q *Queue) Dequeue() Node

func (*Queue) Enqueue

func (q *Queue) Enqueue(n Node)

func (*Queue) Reset

func (q *Queue) Reset()

func (*Queue) Size

func (q *Queue) Size() int

type Stack

type Stack []Node

func (*Stack) Pop

func (s *Stack) Pop() Node

func (*Stack) Push

func (s *Stack) Push(n Node)

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