Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Edge

type Edge struct {
	ID, Weight int32
}

type Graph

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

func NewGraph

func NewGraph() *Graph

func (*Graph) AddEdge

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

func (*Graph) AddNode

func (g *Graph) AddNode() int32

func (*Graph) AllPaths

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

func (*Graph) Connections

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

func (*Graph) GetEdges

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