Versions in this module Expand all Collapse all v0 v0.0.1 Aug 20, 2021 Changes in this version + func CheckInt64PartialOrdering(l []int64, u, v int64) bool + func CompareEdgeLists(l1, l2 []Edge) bool + func CompareInt64Lists(l1, l2 []int64) bool + func CompareNodeLists(l1, l2 []Node) bool + func RemoveInt64ByValue(l []int64, val int64) []int64 + type Edge struct + func (e Edge) Data() (interface{}, error) + func (e Edge) Delete() error + func (e Edge) Exists() bool + func (e Edge) ID() int64 + func (e Edge) MustData() interface{} + func (e Edge) MustSink() Node + func (e Edge) MustSource() Node + func (e Edge) ReplaceData(data interface{}) error + func (e Edge) Sink() (Node, error) + func (e Edge) Source() (Node, error) + type ErrIntegrity struct + func (e *ErrIntegrity) Error() string + type ErrNoSuchEdge struct + func (e *ErrNoSuchEdge) Error() string + type ErrNoSuchNode struct + func (e *ErrNoSuchNode) Error() string + type Graph struct + func NewGraph() *Graph + func (g *Graph) EdgeByID(id int64) (Edge, bool) + func (g *Graph) Edges() []Edge + func (g *Graph) EdgesBetween(source, sink Node) ([]Edge, error) + func (g *Graph) ForeachEdge(callback func(Edge) bool) + func (g *Graph) ForeachNode(callback func(Node) bool) + func (g *Graph) MustEdgesBetween(source, sink Node) []Edge + func (g *Graph) MustNewEdgeWithData(source, sink Node, data interface{}) Edge + func (g *Graph) NewEdgeWithData(source, sink Node, data interface{}) (Edge, error) + func (g *Graph) NewNodeWithData(data interface{}) Node + func (g *Graph) NodeByID(id int64) (Node, bool) + func (g *Graph) Nodes() []Node + type Int64Queue struct + func NewInt64Queue() *Int64Queue + func (q *Int64Queue) Dequeue() (int64, bool) + func (q *Int64Queue) Enqueue(v int64) + func (q *Int64Queue) Len() int + func (q *Int64Queue) Peek() (int64, bool) + type Int64Stack struct + func NewInt64Stack() *Int64Stack + func (s *Int64Stack) Len() int + func (s *Int64Stack) Peek() (int64, bool) + func (s *Int64Stack) Pop() (int64, bool) + func (s *Int64Stack) Push(v int64) + type Node struct + func (n Node) Adjacent() ([]Node, error) + func (n Node) Ancestors() ([]Node, error) + func (n Node) BFS() ([]Node, error) + func (n Node) DFS() ([]Node, error) + func (n Node) Data() (interface{}, error) + func (n Node) Delete() error + func (n Node) Edges() ([]Edge, error) + func (n Node) Exists() bool + func (n Node) ForEachBFS(callback func(Node) bool) error + func (n Node) ForEachDFS(callback func(Node) bool) error + func (n Node) ForeachAdjacent(callback func(Node)) error + func (n Node) ForeachAncestor(callback func(Node)) error + func (n Node) ForeachEdge(callback func(Edge)) error + func (n Node) ForeachInEdge(callback func(Edge)) error + func (n Node) ForeachOutEdge(callback func(Edge)) error + func (n Node) ForeachSuccessor(callback func(Node)) error + func (n Node) ID() int64 + func (n Node) InEdges() ([]Edge, error) + func (n Node) MustAdjacent() []Node + func (n Node) MustAncestors() []Node + func (n Node) MustBFS() []Node + func (n Node) MustDFS() []Node + func (n Node) MustData() interface{} + func (n Node) MustEdges() []Edge + func (n Node) MustInEdges() []Edge + func (n Node) MustOutEdges() []Edge + func (n Node) MustSuccessors() []Node + func (n Node) OutEdges() ([]Edge, error) + func (n Node) ReplaceData(data interface{}) error + func (n Node) Successors() ([]Node, error)