util

package
v0.16.37 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Edge added in v0.16.3

type Edge struct {
	ID, Weight int32
}

type Graph added in v0.16.3

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

func NewGraph added in v0.16.3

func NewGraph() *Graph

func (*Graph) AddEdge added in v0.16.3

func (g *Graph) AddEdge(from, to, weight int32) (int32, error)

func (*Graph) AddNode added in v0.16.3

func (g *Graph) AddNode() int32

func (*Graph) AllPaths added in v0.16.3

func (g *Graph) AllPaths(from, to int32) [][]int32

func (*Graph) Connections added in v0.16.27

func (g *Graph) Connections(n int32) []int32

func (*Graph) GetEdges added in v0.16.3

func (g *Graph) GetEdges(from, to int32) []Edge

type StackInf

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

func NewStackInf

func NewStackInf() *StackInf

Create a new StackInf

func (*StackInf) Len

func (s *StackInf) Len() int

Return the number of items in the StackInf

func (*StackInf) Peek

func (s *StackInf) Peek() interface{}

View the top item on the StackInf

func (*StackInf) Pop

func (s *StackInf) Pop() interface{}

Pop the top item of the StackInf and return it

func (*StackInf) Push

func (s *StackInf) Push(value interface{})

Push a value onto the top of the StackInf

type StackInt32

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

func NewStackInt32

func NewStackInt32() *StackInt32

Create a new StackInt32

func (*StackInt32) Len

func (s *StackInt32) Len() int

Return the number of items in the StackInt32

func (*StackInt32) Peek

func (s *StackInt32) Peek() int32

View the top item on the StackInt32

func (*StackInt32) Pop

func (s *StackInt32) Pop() int32

Pop the top item of the StackInt32 and return it

func (*StackInt32) Push

func (s *StackInt32) Push(value int32)

Push a value onto the top of the StackInt32

Jump to

Keyboard shortcuts

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