graph

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Graph

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

Graph has named nodes/vertexes

func NewGraph

func NewGraph() *Graph

func NewGraphFromCsvInput

func NewGraphFromCsvInput(in csvin.CsvInput) *Graph

func (*Graph) AddEqualWeightPath

func (self *Graph) AddEqualWeightPath(names []string, weight float64)

func (*Graph) AddNode

func (self *Graph) AddNode(name string)

func (*Graph) AddPath

func (self *Graph) AddPath(names []string, weights []float64)

func (*Graph) AddUnknownPath

func (self *Graph) AddUnknownPath(n1, n2 string, n uint, weight float64)

AddUnknownPath adds a path from n1 through n "unknowns" to n2 distributing the weight accordingly

func (*Graph) Edge

func (self *Graph) Edge(n1, n2 string) gonumGraph.Edge

func (*Graph) Edges

func (self *Graph) Edges() gonumGraph.Edges

func (*Graph) From

func (self *Graph) From(name string) gonumGraph.Nodes

func (*Graph) NameFromID

func (self *Graph) NameFromID(id int64) string

func (*Graph) NewWeightedEdge

func (self *Graph) NewWeightedEdge(n1, n2 string, weight float64) gonumGraph.WeightedEdge

func (*Graph) Node

func (self *Graph) Node(name string) gonumGraph.Node

func (*Graph) Nodes

func (self *Graph) Nodes() gonumGraph.Nodes

func (*Graph) PruneToShortest

func (self *Graph) PruneToShortest() *Graph

func (*Graph) RemoveNode

func (self *Graph) RemoveNode(name string)

func (*Graph) RmDisconnected

func (self *Graph) RmDisconnected()

func (*Graph) Weight

func (self *Graph) Weight(xid, yid int64) (w float64, ok bool)

func (*Graph) WeightedEdge

func (self *Graph) WeightedEdge(n1, n2 string) gonumGraph.WeightedEdge

func (*Graph) WeightedEdges

func (self *Graph) WeightedEdges() gonumGraph.WeightedEdges

Jump to

Keyboard shortcuts

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