Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DirectedEdge ¶
type DirectedEdge struct {
Id string `json:"id,omitempty" yaml:"id,omitempty" mapstructure:"id,omitempty"`
Source []string `json:"source" yaml:"source" mapstructure:"source"`
Target []string `json:"target" yaml:"target" mapstructure:"target"`
Relation string `json:"relation,omitempty" yaml:"relation,omitempty" mapstructure:"relation,omitempty"`
Label string `json:"label,omitempty" yaml:"label,omitempty" mapstructure:"label,omitempty"`
Metadata metadata.Metadata `json:"metadata,omitempty" yaml:"metadata,omitempty" mapstructure:"metadata,omitempty"`
}
type DirectedGraph ¶
type DirectedGraph struct {
GraphBase
Edges []DirectedEdge `json:"hyperedges" yaml:"hyperedges" mapstructure:"hyperedges"`
}
A directed graph - has a list of directed edges
type DirectedJsonGraph ¶
type DirectedJsonGraph struct {
Graph DirectedGraph `json:"graph" yaml:"graph" mapstructure:"graph"`
}
DirectedJsonGraph is explicitly a directed graph
func NewDirectedGraph ¶
func NewDirectedGraph() *DirectedJsonGraph
type DirectedJsonGraphList ¶
type DirectedJsonGraphList struct {
Graphs []DirectedGraph `json:"graphs" yaml:"graphs" mapstructure:"graphs"`
}
type Edge ¶
type Edge struct {
Id string `json:"id,omitempty" yaml:"id,omitempty" mapstructure:"id,omitempty"`
Source string `json:"source" yaml:"source" mapstructure:"source"`
Target string `json:"target" yaml:"target" mapstructure:"target"`
Relation string `json:"relation,omitempty" yaml:"relation,omitempty" mapstructure:"relation,omitempty"`
Label string `json:"label,omitempty" yaml:"label,omitempty" mapstructure:"label,omitempty"`
Directed bool `json:"directed,omitempty" yaml:"directed,omitempty" mapstructure:"directed,omitempty"`
Metadata metadata.Metadata `json:"metadata,omitempty" yaml:"metadata,omitempty" mapstructure:"metadata,omitempty"`
}
type GraphBase ¶
type GraphBase struct {
Id string `json:"id,omitempty" yaml:"id,omitempty" mapstructure:"id,omitempty"`
Label string `json:"label,omitempty" yaml:"label,omitempty" mapstructure:"label,omitempty"`
Directed bool `json:"directed,omitempty" yaml:"directed,omitempty" mapstructure:"directed,omitempty"`
Type string `json:"type,omitempty" yaml:"type,omitempty" mapstructure:"type,omitempty"`
Nodes map[string]Node `json:"nodes" yaml:"nodes" mapstructure:"nodes"`
}
The graph base has attributes shared across graphs
type JsonGraph ¶
type JsonGraph struct {
Graph Graph `json:"graph" yaml:"graph" mapstructure:"graph"`
}
A JSONGraph can either be parsed into a list of graps or single graph We have types for standard, and then explicitly directed and undirected
type JsonGraphList ¶
type JsonGraphList struct {
Graphs []Graph `json:"graphs" yaml:"graphs" mapstructure:"graphs"`
}
type UndirectedEdge ¶
type UndirectedEdge struct {
Id string `json:"id,omitempty" yaml:"id,omitempty" mapstructure:"id,omitempty"`
Nodes []string `json:"nodes" yaml:"nodes" mapstructure:"nodes"`
Relation string `json:"relation,omitempty" yaml:"relation,omitempty" mapstructure:"relation,omitempty"`
Label string `json:"label,omitempty" yaml:"label,omitempty" mapstructure:"label,omitempty"`
Metadata metadata.Metadata `json:"metadata,omitempty" yaml:"metadata,omitempty" mapstructure:"metadata,omitempty"`
}
type UndirectedGraph ¶
type UndirectedGraph struct {
GraphBase
Edges []UndirectedEdge `json:"hyperedges" yaml:"hyperedges" mapstructure:"hyperedges"`
}
An undirected graph - has a list of undirected edges
type UndirectedJsonGraph ¶
type UndirectedJsonGraph struct {
Graph UndirectedGraph `json:"graph" yaml:"graph" mapstructure:"graph"`
}
UndirectedJsonGraph is explicitly an undirected graph
func NewUndirectedGraph ¶
func NewUndirectedGraph() *UndirectedJsonGraph
type UndirectedJsonGraphList ¶
type UndirectedJsonGraphList struct {
Graphs []UndirectedGraph `json:"graphs" yaml:"graphs" mapstructure:"graphs"`
}
Click to show internal directories.
Click to hide internal directories.