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