structural

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BorrowTransitions

func BorrowTransitions(index *Index, source TransitionSource, current core.Template, route string, neighborLimit int, predictionLimit int, penalty float64) ([]core.Prediction, []core.StructuralNeighbor)

func WeightedJaccard

func WeightedJaccard(left, right core.FeatureMap) (float64, []string)

Types

type Config

type Config struct {
	MaxTemplates           int
	MaxFeaturesPerTemplate int
	MinSimilarity          float64
}

type Index

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

func New

func New(cfg Config) *Index

func (*Index) Add

func (idx *Index) Add(id core.TemplateID, features core.FeatureMap)

func (*Index) FeatureCount

func (idx *Index) FeatureCount() int

func (*Index) Has

func (idx *Index) Has(id core.TemplateID) bool

func (*Index) Len

func (idx *Index) Len() int

func (*Index) Nearest

func (idx *Index) Nearest(exclude core.TemplateID, query core.FeatureMap, limit int) []core.StructuralNeighbor

type TransitionSource

type TransitionSource interface {
	PredictFromTemplate(templateID core.TemplateID, route string, limit int) []core.Prediction
}

Jump to

Keyboard shortcuts

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