algoutils

package
v1.76.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasPrefixSequence_Comparables

func HasPrefixSequence_Comparables[T comparable](s1, s2 []T) bool

func HasPrefixSequence_Fibers

func HasPrefixSequence_Fibers[T IFiber](s1, s2 []T) bool

func HasSubSequence_Comparables

func HasSubSequence_Comparables[T comparable](s1, s2 []T) bool

func HasSubSequence_Fibers

func HasSubSequence_Fibers[T IFiber](s1, s2 []T) bool

Types

type FMTTF added in v1.73.0

type FMTTF[Tv any, Tk1 comparable] map[Tk1]FMTTF_Node[Tv, Tk1]

Fast-Match Table Tree

func (FMTTF[Tv, Tk1]) FastMatch added in v1.73.0

func (table FMTTF[Tv, Tk1]) FastMatch(sample_seq []Tk1) (v Tv, ok bool)

Matches the provided sample sequence against the table tree. It is fast compared to multiple subsequences search. Look at examples in tests, and also at the c59145cfdde048f5a3ef.

type FMTTF_Node added in v1.73.0

type FMTTF_Node[Tv any, Tk1 comparable] struct {
	F           func(kk []Tk1) Tv
	FmttfNested FMTTF[Tv, Tk1]
}

Fast-Match Table Tree Node

type FMTTV added in v1.73.0

type FMTTV[Tv any, Tk1 comparable] map[Tk1]FMTTV_Node[Tv, Tk1]

Fast-Match Table Tree

func (FMTTV[Tv, Tk1]) FastMatch added in v1.73.0

func (table FMTTV[Tv, Tk1]) FastMatch(sample_seq []Tk1) (v Tv, ok bool)

Matches the provided sample sequence against the table tree. It is fast compared to multiple subsequences search.

type FMTTV_Node added in v1.73.0

type FMTTV_Node[Tv any, Tk1 comparable] struct {
	UseV        bool
	V           Tv
	FmttvNested FMTTV[Tv, Tk1]
}

Fast-Match Table Tree Node

type IFiber added in v1.73.0

type IFiber interface {
	string | []byte
}

Jump to

Keyboard shortcuts

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