Documentation
¶
Index ¶
- type Connection
- type Graph
- func (graph *Graph[O, P]) AddConnection(connection *Connection[O, P]) error
- func (graph *Graph[O, P]) AddNode(node *Node[O, P])
- func (graph *Graph[O, P]) Connect(fromNode *Node[O, P], fromPort P, toNode *Node[O, P], toPort P) error
- func (graph *Graph[O, P]) ConnectBi(fromNode *Node[O, P], fromPort P, toNode *Node[O, P], toPort P) error
- func (graph *Graph[O, P]) ConnectRef(fromRef O, fromPort P, toRef O, toPort P) error
- func (graph *Graph[O, P]) ConnectRefBi(fromRef O, fromPort P, toRef O, toPort P) error
- func (graph *Graph[O, P]) Find(fromNode *Node[O, P], fromPort P, toNode *Node[O, P], toPort P) [][]*PathSegment[O, P]
- func (graph *Graph[O, P]) FindConnection(node *Node[O, P], port P) (*Connection[O, P], bool)
- func (graph *Graph[O, P]) FindRef(fromRef O, fromPort P, toRef O, toPort P) ([][]*PathSegment[O, P], error)
- type Node
- type PathSegment
- type Triple
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection[O, P comparable] struct { FromNode *Node[O, P] FromPort P ToNode *Node[O, P] ToPort P }
func NewConnection ¶
func NewConnection[O, P comparable](fromNode *Node[O, P], fromPort P, toNode *Node[O, P], toPort P) *Connection[O, P]
func (*Connection[O, P]) EqualNodes ¶
func (connection *Connection[O, P]) EqualNodes() bool
func (*Connection[O, P]) IsSelf ¶
func (connection *Connection[O, P]) IsSelf() bool
func (*Connection[O, P]) String ¶
func (connection *Connection[O, P]) String() string
type Graph ¶
type Graph[O, P comparable] struct { // contains filtered or unexported fields }
func NewGraph ¶
func NewGraph[O, P comparable]() *Graph[O, P]
func (*Graph[O, P]) AddConnection ¶
func (graph *Graph[O, P]) AddConnection(connection *Connection[O, P]) error
func (*Graph[O, P]) ConnectRef ¶
func (*Graph[O, P]) ConnectRefBi ¶
func (*Graph[O, P]) Find ¶
func (graph *Graph[O, P]) Find(fromNode *Node[O, P], fromPort P, toNode *Node[O, P], toPort P) [][]*PathSegment[O, P]
func (*Graph[O, P]) FindConnection ¶
func (graph *Graph[O, P]) FindConnection(node *Node[O, P], port P) (*Connection[O, P], bool)
func (*Graph[O, P]) FindRef ¶
func (graph *Graph[O, P]) FindRef(fromRef O, fromPort P, toRef O, toPort P) ([][]*PathSegment[O, P], error)
type Node ¶
type Node[O, P comparable] struct { // contains filtered or unexported fields }
func NewNode ¶
func NewNode[O, P comparable](id O) *Node[O, P]
type PathSegment ¶ added in v0.3.0
func (*PathSegment[O, P]) String ¶ added in v0.3.0
func (seg *PathSegment[O, P]) String() string
Click to show internal directories.
Click to hide internal directories.
