Documentation
¶
Index ¶
- func AddEdge(g DirectedGraph, from Node, to Node)
- func AddEdges(g DirectedGraph, edges [][2]Node)
- func AddEdgesWithAttrs(g DirectedGraph, edges EdgesWithAttrs)
- func AddNodes(g DirectedGraph, nodes ...Node)
- func AddNodesWithAttrs(g DirectedGraph, nodes NodesWithAttrs)
- func HasEdge(g DirectedGraphView, from Node, to Node) bool
- func HasNode(g DirectedGraphView, node Node) bool
- func RemoveEdges(g DirectedGraph, edges [][2]Node)
- func RemoveNodes(g DirectedGraph, nodes ...Node)
- type Attrs
- type AttrsView
- type Cycle
- type DirectedGraph
- type DirectedGraphView
- type EdgeAndAttrsIterator
- type EdgeEntry
- type EdgesWithAttrs
- type Node
- type NodeAndAttrsIterator
- type NodeEntry
- type NodeIterator
- type NodeSet
- type NodesWithAttrs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddEdge ¶
func AddEdge(g DirectedGraph, from Node, to Node)
func AddEdges ¶
func AddEdges(g DirectedGraph, edges [][2]Node)
func AddEdgesWithAttrs ¶
func AddEdgesWithAttrs(g DirectedGraph, edges EdgesWithAttrs)
func AddNodes ¶
func AddNodes(g DirectedGraph, nodes ...Node)
func AddNodesWithAttrs ¶
func AddNodesWithAttrs(g DirectedGraph, nodes NodesWithAttrs)
func HasNode ¶
func HasNode(g DirectedGraphView, node Node) bool
func RemoveEdges ¶
func RemoveEdges(g DirectedGraph, edges [][2]Node)
func RemoveNodes ¶
func RemoveNodes(g DirectedGraph, nodes ...Node)
Types ¶
type Cycle ¶
type Cycle []Node
func FindCycles ¶
func FindCycles(g DirectedGraphView) []Cycle
FindCycles see https://github.com/networkx/networkx/blob/main/networkx/algorithms/cycles.py#L98
type DirectedGraph ¶
type DirectedGraph interface { DirectedGraphView AddNodeWithAttrs(node Node, attrs AttrsView) RemoveNode(node Node) AddEdgeWithAttrs(from Node, to Node, attrs AttrsView) RemoveEdge(from Node, to Node) }
func DeriveDirectedGraph ¶
func DeriveDirectedGraph(parent DirectedGraphView) DirectedGraph
func NewDirectedGraph ¶
func NewDirectedGraph() DirectedGraph
func NewDirectedGraphFrom ¶
func NewDirectedGraphFrom(source DirectedGraphView) DirectedGraph
func NewDirectedGraphWithInNodes ¶
func NewDirectedGraphWithInNodes(source DirectedGraphView, nodes []Node) DirectedGraph
type DirectedGraphView ¶
type DirectedGraphView interface { NodeAttrs(node Node) (AttrsView, bool) Nodes() NodeAndAttrsIterator EdgeAttrs(from, to Node) (AttrsView, bool) Edges() EdgeAndAttrsIterator OutEdgesOf(node Node) EdgeAndAttrsIterator InEdgesOf(node Node) EdgeAndAttrsIterator }
func SubGraphOf ¶
func SubGraphOf(source DirectedGraphView, predicate func(Node) bool) DirectedGraphView
func SubGraphWithNodes ¶
func SubGraphWithNodes(source DirectedGraphView, nodes []Node) DirectedGraphView
type EdgeAndAttrsIterator ¶
type EdgesWithAttrs ¶
func EdgesWithAttrsFrom ¶
func EdgesWithAttrsFrom(ei EdgeAndAttrsIterator) EdgesWithAttrs
type NodeAndAttrsIterator ¶
func GetNodesInDirectionMatch ¶
func GetNodesInDirectionMatch(node Node, directionFunc func(Node) NodeAndAttrsIterator, predicate func(Node, AttrsView) bool) NodeAndAttrsIterator
func PredecessorsOf ¶
func PredecessorsOf(g DirectedGraphView, node Node) NodeAndAttrsIterator
func SuccessorsOf ¶
func SuccessorsOf(g DirectedGraphView, node Node) NodeAndAttrsIterator
type NodeIterator ¶
type NodesWithAttrs ¶
func NodesWithAttrsFrom ¶
func NodesWithAttrsFrom(ni NodeAndAttrsIterator) NodesWithAttrs
Click to show internal directories.
Click to hide internal directories.