edge_weighted_directed_graph

package
v0.0.0-...-8859e38 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirectedEdge

type DirectedEdge struct {
	From   int
	To     int
	Weight float64
}

type EdgeWeightedDigraph

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

func NewEdgeWeightedDigraph

func NewEdgeWeightedDigraph(sizeV int) *EdgeWeightedDigraph

func (*EdgeWeightedDigraph) AddEdge

func (g *EdgeWeightedDigraph) AddEdge(e DirectedEdge)

func (*EdgeWeightedDigraph) AdjacencyList

func (g *EdgeWeightedDigraph) AdjacencyList(v int) []DirectedEdge

func (*EdgeWeightedDigraph) Edges

func (g *EdgeWeightedDigraph) Edges() []DirectedEdge

func (*EdgeWeightedDigraph) EdgesCount

func (g *EdgeWeightedDigraph) EdgesCount() int

func (*EdgeWeightedDigraph) Indegree

func (g *EdgeWeightedDigraph) Indegree(v int) int

func (*EdgeWeightedDigraph) Outdegree

func (g *EdgeWeightedDigraph) Outdegree(v int) int

func (*EdgeWeightedDigraph) VerticesCount

func (g *EdgeWeightedDigraph) VerticesCount() int

type Node

type Node struct {
	Item DirectedEdge
	Next *Node
}

type Stack

type Stack struct {
	First *Node
	Size  int
}

func NewStack

func NewStack(e DirectedEdge) Stack

func (Stack) IsEmpty

func (s Stack) IsEmpty() bool

func (*Stack) Peek

func (s *Stack) Peek() (DirectedEdge, error)

func (*Stack) Pop

func (s *Stack) Pop() (DirectedEdge, error)

func (*Stack) Push

func (s *Stack) Push(e DirectedEdge)

Jump to

Keyboard shortcuts

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