Documentation ¶
Index ¶
- Variables
- type HierarchicalDigraph
- func (g *HierarchicalDigraph) AddEdge(src Node, dst Node) error
- func (g *HierarchicalDigraph) AddNode(node Node) error
- func (g *HierarchicalDigraph) DeleteEdge(src Node, dst Node) error
- func (g *HierarchicalDigraph) DeleteNode(hash string) error
- func (g HierarchicalDigraph) GetLevel(level int) NodeRefs
- func (g HierarchicalDigraph) GetNode(hash string) (Node, error)
- type Node
- type NodeRefs
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNilGraph = errors.New("cannot operate on nil-graph") ErrNilNode = errors.New("cannot operate on nil-node") ErrNodeAlreadyExists = errors.New("node with identical hash already exists in graph") ErrNodeNotFound = errors.New("node not found") ErrEdgeSelf = errors.New("self-edges are not allowed") ErrEdgeCrossLevel = errors.New("edges not allowed between nodes of different hierarchical levels") )
Functions ¶
This section is empty.
Types ¶
type HierarchicalDigraph ¶
type HierarchicalDigraph struct {
// contains filtered or unexported fields
}
func NewHierarchicalDigraph ¶
func NewHierarchicalDigraph(log *logger.Logger) *HierarchicalDigraph
func (*HierarchicalDigraph) AddEdge ¶
func (g *HierarchicalDigraph) AddEdge(src Node, dst Node) error
func (*HierarchicalDigraph) AddNode ¶
func (g *HierarchicalDigraph) AddNode(node Node) error
func (*HierarchicalDigraph) DeleteEdge ¶
func (g *HierarchicalDigraph) DeleteEdge(src Node, dst Node) error
func (*HierarchicalDigraph) DeleteNode ¶
func (g *HierarchicalDigraph) DeleteNode(hash string) error
func (HierarchicalDigraph) GetLevel ¶
func (g HierarchicalDigraph) GetLevel(level int) NodeRefs
type NodeRefs ¶
type NodeRefs struct {
// contains filtered or unexported fields
}
func NewNodeRefs ¶
func NewNodeRefs() NodeRefs
Click to show internal directories.
Click to hide internal directories.