graph

package
v0.0.0-...-9560b92 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register[T linalg.Number]()

Types

type AKnnGraphBuilder

type AKnnGraphBuilder[T linalg.Number] struct {
	// contains filtered or unexported fields
}

func NewAKnnGraphBuilder

func NewAKnnGraphBuilder[T linalg.Number]() *AKnnGraphBuilder[T]

func (*AKnnGraphBuilder[T]) Build

func (agc *AKnnGraphBuilder[T]) Build(n uint, distFunc func(i, j uint) float32) (Graph, error)

func (AKnnGraphBuilder[T]) GetPrameterString

func (agc AKnnGraphBuilder[T]) GetPrameterString() string

func (*AKnnGraphBuilder[T]) SetK

func (agc *AKnnGraphBuilder[T]) SetK(k uint) *AKnnGraphBuilder[T]

func (*AKnnGraphBuilder[T]) SetMaxChanges

func (agc *AKnnGraphBuilder[T]) SetMaxChanges(maxChanges uint) *AKnnGraphBuilder[T]

func (*AKnnGraphBuilder[T]) SetMaxIter

func (agc *AKnnGraphBuilder[T]) SetMaxIter(maxIter uint) *AKnnGraphBuilder[T]

func (*AKnnGraphBuilder[T]) SetRho

func (agc *AKnnGraphBuilder[T]) SetRho(rho float64) *AKnnGraphBuilder[T]

type Graph

type Graph struct {
	Nodes []Node
}

func ConvertToUndirected

func ConvertToUndirected(g Graph) Graph

type GraphBuilder

type GraphBuilder interface {
	Build(n uint, distFunc func(i, j uint) float32) (Graph, error)
	GetPrameterString() string
}

type Nndescent

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

func NewNndescent

func NewNndescent(initGraph Graph, k uint, rho float64, f func(i, j uint) float32, options ...Option) Nndescent

func (Nndescent) Create

func (n Nndescent) Create() Graph

func (*Nndescent) Update

func (n *Nndescent) Update() uint

type Node

type Node struct {
	Neighbors []uint
}

type Option

type Option func(*Nndescent)

func WithMaxGoroutines

func WithMaxGoroutines(maxGoroutines uint) Option

Jump to

Keyboard shortcuts

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