graph

package
v0.0.0-...-714934f Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NodeID

func NodeID(inf snet.PathInterface) int64

func SvgB64Buffer

func SvgB64Buffer(graph InterfaceGraph) (string, error)

Types

type InterfaceGraph

type InterfaceGraph struct {
	// contains filtered or unexported fields
}

func NewInterfaceGraph

func NewInterfaceGraph() InterfaceGraph

func (*InterfaceGraph) AddNode

func (i *InterfaceGraph) AddNode(node InterfaceNode)

func (*InterfaceGraph) Edge

func (i *InterfaceGraph) Edge(from, to int64) *InterfaceLink

func (*InterfaceGraph) GetOrCreateNode

func (i *InterfaceGraph) GetOrCreateNode(p snet.PathInterface) (*InterfaceNode, bool)

func (*InterfaceGraph) Node

func (i *InterfaceGraph) Node(id int64) *InterfaceNode

func (*InterfaceGraph) Nodes

func (i *InterfaceGraph) Nodes() graph.Nodes

func (*InterfaceGraph) SerializeDot

func (i *InterfaceGraph) SerializeDot() ([]byte, error)

func (*InterfaceGraph) SetEdge

func (i *InterfaceGraph) SetEdge(link InterfaceLink)
type InterfaceLink struct {
	State LinkState
	// contains filtered or unexported fields
}
func NewInterfaceLink(from, to *InterfaceNode, state LinkState) InterfaceLink

func (InterfaceLink) Attributes

func (e InterfaceLink) Attributes() []encoding.Attribute

func (InterfaceLink) From

func (e InterfaceLink) From() graph.Node

func (InterfaceLink) ReversedEdge

func (e InterfaceLink) ReversedEdge() graph.Edge

func (InterfaceLink) To

func (e InterfaceLink) To() graph.Node

type InterfaceNode

type InterfaceNode struct {
	// contains filtered or unexported fields
}

func (InterfaceNode) Attributes

func (ni InterfaceNode) Attributes() []encoding.Attribute

func (InterfaceNode) DOTID

func (ni InterfaceNode) DOTID() string

func (InterfaceNode) ID

func (ni InterfaceNode) ID() int64

type LinkState

type LinkState interface {
	Score() float64
	GetConfidence() float64
}

type LinkStateMock

type LinkStateMock struct {
	mock.Mock
}

func (*LinkStateMock) GetConfidence

func (l *LinkStateMock) GetConfidence() float64

func (*LinkStateMock) Score

func (l *LinkStateMock) Score() float64

Jump to

Keyboard shortcuts

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