graph

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2019 License: MIT Imports: 6 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, maxDist uint) *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) AddRelationalPath added in v0.3.0

func (self *Graph) AddRelationalPath(n1, n2 string, dist uint, weight float64)

AddRelationalPath adds a path from n1 to n2 distributing the weight accordingly between dist number of links

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(indvs []string) *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