Documentation ¶
Overview ¶
Package graphs implements utility functions on Nuggit Graphs.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuilderOption ¶
type BuilderOption func(b *builderOptions)
func Data ¶
func Data(data any) BuilderOption
func Edge ¶
func Edge(dst nuggit.Key, opts ...EdgeOption) BuilderOption
func Key ¶
func Key(k nuggit.Key) BuilderOption
func Stage ¶
func Stage(s nuggit.StageKey) BuilderOption
type EdgeOption ¶
type EdgeOption func(*edgeOptions)
func DstField ¶
func DstField(k nuggit.FieldKey) EdgeOption
func EdgeKey ¶
func EdgeKey(key string) EdgeOption
func SrcField ¶
func SrcField(k nuggit.FieldKey) EdgeOption
type Graph ¶
type Graph struct { Stage nuggit.StageKey Adjacency map[nuggit.NodeKey]nuggit.Adjacency Edges map[nuggit.EdgeKey]nuggit.Edge Nodes map[nuggit.NodeKey]nuggit.Node }
Graph implements a Graph structure that supports efficient for Graph Key lookup.
See nuggit.Graph.
func FromFile ¶
FromFile loads a Graph from a JSON file. The file may be either a JSON encoded Resource or Graph. Checksum integrity checks are ignored.
func (*Graph) Delete ¶
Delete removes the node from the graph and all edges. It returns the pruned edges.
Click to show internal directories.
Click to hide internal directories.