Documentation ¶
Overview ¶
Package compatible implements a wrapper around graph.Graph which is compatible with gonum/graph.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Edge ¶
type Edge struct {
// contains filtered or unexported fields
}
Edge implements gonum/graph.Edge.
Note that as this wrapper uses MustSink() and MustSource(), it may panic if From() or To() are called inappropriately.
func (*Edge) ReversedEdge ¶
ReversedEdge implements gonum/graph.Edge.
Note that edge reversal is not supported, because it would mutate the graph. Per the gonum/graph.Edge documentation, this simply returns the receiver unaltered.
type Graph ¶
type Graph struct {
// contains filtered or unexported fields
}
Graph implements gonum/graph.Graph It is based on a backing instance of graph.Graph. Note that care is needed - leaving gonum with dangling references to graph nodes or edges may cause issues if they are later deleted. It is recommended that the underlying graph.Graph not be mutated during any gonum usage of the graph structure.
func NewGraph ¶
NewGraph instantiates a gonum/graph.Graph compatible graph from an existing graph.Graph instance.
func (*Graph) EdgeBetween ¶
EdgeBetween implements gonum/graph.Undirected
func (*Graph) HasEdgeBetween ¶
HasEdgeBetween implements gonum/graph.Graph.
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node wraps graph.Node to be gonum/graph.Node compatible.