Documentation ¶
Index ¶
- Constants
- type Edge
- func (e Edge) Attributes() []encoding.Attribute
- func (e *Edge) Attrs() map[string]interface{}
- func (e Edge) Color() color.RGBA
- func (e *Edge) From() gonum.Node
- func (e Edge) Label() string
- func (e *Edge) ReversedEdge() gonum.Edge
- func (e *Edge) SetLabel(l string)
- func (e *Edge) SetUID(uid string)
- func (e *Edge) SetWeight(w float64)
- func (e Edge) Shape() string
- func (e Edge) Style() string
- func (e *Edge) To() gonum.Node
- func (e Edge) UID() string
- func (e Edge) Weight() float64
- type Graph
- type Node
- func (n Node) Attributes() []encoding.Attribute
- func (n *Node) Attrs() map[string]interface{}
- func (n Node) Color() color.RGBA
- func (n Node) DOTID() string
- func (n Node) ID() int64
- func (n Node) Label() string
- func (n *Node) SetDOTID(dotid string)
- func (n *Node) SetLabel(l string)
- func (n *Node) SetUID(uid string)
- func (n Node) Shape() string
- func (n Node) Type() string
- func (n Node) UID() string
- type Option
- type Options
Constants ¶
View Source
const ( // DefaultLabel is memory graph default label. DefaultLabel = "InMemoryGraph" // DefaultType is default graph type. DefaultType = "weighted_directed" // DefaultWeight is default edge weight. DefaultWeight = 1.0 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Edge ¶
type Edge struct {
// contains filtered or unexported fields
}
Edge is a weighted graph edge.
func EdgeDeepCopy ¶
EdgeDeepCopy makes a deep copy of Edge and returns it
func (Edge) Attributes ¶
Attributes returns node DOT attributes.
func (*Edge) ReversedEdge ¶
ReversedEdge returns a new edge with end points of the pair swapped.
type Graph ¶
type Graph struct { *simple.WeightedDirectedGraph // contains filtered or unexported fields }
Graph is an in-memory graph.
func GraphDeepCopy ¶
GraphDeepCopy return s deep copy of a memory graph.
func (Graph) HasEdgeFromTo ¶
HasEdgeFromTo returns whether an edge exist between two nodoes with the given IDs.
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node is a graph node.
func NodeDeepCopy ¶
NodeDeepCopy makes a deep copy of Node and returns it.
func (Node) Attributes ¶
Attributes returns node DOT attributes.
type Options ¶
type Options struct { // UID configures UID UID string // Label configures Label. Label string // Attrs configures Attrs. Attrs map[string]interface{} // DotID configures DOT ID DotID string // Type is graph type Type string // Weight configures weight. Weight float64 // Style configures style. Style style.Style }
Options configure graph.
Click to show internal directories.
Click to hide internal directories.