package linear
import "gonum.org/v1/gonum/graph/internal/linear"
Package linear provides common linear data structures.
Index ¶
- type NodeQueue
- func (q *NodeQueue) Dequeue() graph.Node
- func (q *NodeQueue) Enqueue(n graph.Node)
- func (q *NodeQueue) Len() int
- func (q *NodeQueue) Reset()
- type NodeStack
Types ¶
type NodeQueue ¶
type NodeQueue struct {
// contains filtered or unexported fields
}
NodeQueue implements a FIFO queue.
func (*NodeQueue) Dequeue ¶
Dequeue returns the graph.Node at the front of the queue and removes it from the queue.
func (*NodeQueue) Enqueue ¶
Enqueue adds the node n to the back of the queue.
func (*NodeQueue) Len ¶
Len returns the number of graph.Nodes in the queue.
func (*NodeQueue) Reset ¶
func (q *NodeQueue) Reset()
Reset clears the queue for reuse.
type NodeStack ¶
NodeStack implements a LIFO stack of graph.Node.
func (*NodeStack) Len ¶
Len returns the number of graph.Nodes on the stack.
func (*NodeStack) Pop ¶
Pop returns the last graph.Node on the stack and removes it from the stack.
func (*NodeStack) Push ¶
Push adds the node n to the stack at the last position.
Source Files ¶
doc.go linear.go
- Version
- v0.15.1 (latest)
- Published
- Aug 16, 2024
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 1 day ago –
Tools for package owners.