gonum: gonum.org/v1/gonum/graph/internal/linear Index | Files

package linear

import "gonum.org/v1/gonum/graph/internal/linear"

Package linear provides common linear data structures.

Index

Package Files

doc.go linear.go

type NodeQueue Uses

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

NodeQueue implements a FIFO queue.

func (*NodeQueue) Dequeue Uses

func (q *NodeQueue) Dequeue() graph.Node

Dequeue returns the graph.Node at the front of the queue and removes it from the queue.

func (*NodeQueue) Enqueue Uses

func (q *NodeQueue) Enqueue(n graph.Node)

Enqueue adds the node n to the back of the queue.

func (*NodeQueue) Len Uses

func (q *NodeQueue) Len() int

Len returns the number of graph.Nodes in the queue.

func (*NodeQueue) Reset Uses

func (q *NodeQueue) Reset()

Reset clears the queue for reuse.

type NodeStack Uses

type NodeStack []graph.Node

NodeStack implements a LIFO stack of graph.Node.

func (*NodeStack) Len Uses

func (s *NodeStack) Len() int

Len returns the number of graph.Nodes on the stack.

func (*NodeStack) Pop Uses

func (s *NodeStack) Pop() graph.Node

Pop returns the last graph.Node on the stack and removes it from the stack.

func (*NodeStack) Push Uses

func (s *NodeStack) Push(n graph.Node)

Push adds the node n to the stack at the last position.

Package linear imports 1 packages (graph) and is imported by 3 packages. Updated 2019-01-30. Refresh now. Tools for package owners.