cluster

package
v0.0.0-...-4f8ec59 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateLabel

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,
	d string,
) *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

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

func (*Node) Clone

func (n *Node) Clone() *Node

func (*Node) Match

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

func (*Node) Merge

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

type NodeGrouper

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

func NewGrouper

func NewGrouper(
	similarity float64,
) *NodeGrouper

func (*NodeGrouper) Add

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

func (*NodeGrouper) IterGroups

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