graph

package
v0.0.0-...-0d40728 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Edge

type Edge struct {
	Src        int                    `json:"source"`
	Target     int                    `json:"target"`
	Label      string                 `json:"label,omitempty"`
	Attributes map[string]interface{} `json:"attributes,omitempty"`
}

Edge represents a graph edge.

func NewEdge

func NewEdge() *Edge

NewEdge instantiates a new edge.

type Graph

type Graph struct {
	Nodes []*Node `json:"nodes"`
	Edges []*Edge `json:"edges"`
}

Graph represents a graph.

func ParseGML

func ParseGML(gml string) ([]*Graph, error)

ParseGML parses a GML file into a set of graphs.

type Node

type Node struct {
	ID         int                    `json:"id"`
	Label      string                 `json:"label"`
	Attributes map[string]interface{} `json:"attributes,omitempty"`
}

Node represents a graph node.

func NewNode

func NewNode() *Node

NewNode instantiates a new node.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL