package encoding

import "gonum.org/v1/gonum/graph/encoding"

Package encoding provides a common graph encoding API.

Index

Types

type Attribute

type Attribute struct {
	Key, Value string
}

Attribute is an encoded key value attribute pair use in graph encoding.

type AttributeSetter

type AttributeSetter interface {
	SetAttribute(Attribute) error
}

AttributeSetter is implemented by types that can set an encoded graph attribute.

type Attributer

type Attributer interface {
	Attributes() []Attribute
}

Attributer defines graph.Node or graph.Edge values that can specify graph attributes.

type Attributes

type Attributes []Attribute

Attributes is a helper type providing simple attribute handling.

func (*Attributes) Attributes

func (a *Attributes) Attributes() []Attribute

Attributes returns all of the receiver's attributes.

func (*Attributes) SetAttribute

func (a *Attributes) SetAttribute(attr Attribute) error

SetAttribute sets attr in the receiver. Calling SetAttribute with an Attribute with a Key that is in the collection replaces the existing value and calling with an empty Value removes the attribute from the collection if it exists. SetAttribute always returns nil.

type Builder

type Builder interface {
	graph.Graph
	graph.Builder
}

Builder is a graph that can have user-defined nodes and edges added.

type MultiBuilder

type MultiBuilder interface {
	graph.Multigraph
	graph.MultigraphBuilder
}

MultiBuilder is a graph that can have user-defined nodes and edges added.

Source Files

doc.go encoding.go

Directories

PathSynopsis
graph/encoding/digraph6Package digraph6 implements graphs specified by digraph6 strings.
graph/encoding/dotPackage dot implements GraphViz DOT marshaling and unmarshaling of graphs.
graph/encoding/graph6Package graph6 implements graphs specified by graph6 strings.
graph/encoding/graphqlPackage graphql implements JSON marshaling and unmarshaling of graph as used by GraphQL
Version
v0.14.0 (latest)
Published
Aug 19, 2023
Platform
linux/amd64
Imports
1 packages
Last checked
4 hours ago

Tools for package owners.