cluster

package
v1.10.4 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidFormat = errors.New("invalid format")
	ErrInvalidRange  = errors.New("invalid range")
	ErrPortCollision = errors.New("ports collision")
)

Functions

func CreateLabel added in v1.8.1

func CreateLabel(names []string, nmax int) (rv string)

Types

type Layers

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

func NewLayers

func NewLayers(
	b graph.NamedBuilderWriter,
	s float64,
) *Layers

func (*Layers) AddEdge

func (l *Layers) AddEdge(e *node.Edge)

func (*Layers) AddNode

func (l *Layers) AddNode(n *node.Node) error

func (*Layers) Name

func (l *Layers) Name() string

func (*Layers) Write

func (l *Layers) Write(w io.Writer) error

type Node added in v1.8.1

type Node struct {
	Inbounds  set.Set[string]
	Outbounds set.Set[string]
	Ports     *node.Ports
}

func (*Node) Clone added in v1.8.1

func (n *Node) Clone() *Node

func (*Node) Match added in v1.8.1

func (n *Node) Match(id string, o *Node) (rv float64)

func (*Node) Merge added in v1.8.1

func (n *Node) Merge(o *Node)

type NodeGrouper added in v1.8.1

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

func NewGrouper

func NewGrouper(
	similarity float64,
) *NodeGrouper

func (*NodeGrouper) Add added in v1.8.1

func (ng *NodeGrouper) Add(k string, n *Node)

func (*NodeGrouper) IterGroups added in v1.8.1

func (ng *NodeGrouper) IterGroups(
	iter func(int, []string),
)

type Rules

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

func NewRules

func NewRules(
	b graph.NamedBuilderWriter,
	r exprRUN,
) *Rules

func (*Rules) AddEdge

func (cb *Rules) AddEdge(e *node.Edge)

func (*Rules) AddNode

func (cb *Rules) AddNode(n *node.Node) error

func (*Rules) CountRules

func (cb *Rules) CountRules() int

func (*Rules) FromReader

func (cb *Rules) FromReader(r io.Reader) (err error)

func (*Rules) Match

func (cb *Rules) Match(n *node.Node) (cluster string, ok bool)

func (*Rules) Name

func (cb *Rules) Name() string

func (*Rules) Write

func (cb *Rules) Write(w io.Writer) error

Jump to

Keyboard shortcuts

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