trie

package
v0.0.0-...-a2756ab Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2025 License: MPL-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

View Source
const (
	W  = 16
	L1 = 32 * 32
	L2 = 32
)

Variables

View Source
var BitsetTable256 [256]int
View Source
var MaskHi = make(map[int][]uint16)
View Source
var MaskLo = make(map[int][]uint16)

Functions

func Bit0

func Bit0(n int, p int, pad int) int

Types

type FrozenTrie

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

func Build

func Build(tdpath, rdpath, bcpath, ftpath string, rk ReadKind) (ftrie *FrozenTrie, err error)

func NewFrozenTrie

func NewFrozenTrie(td *binstr, rdir *rankdir, nodeCount int, tagfile string) *FrozenTrie

func (*FrozenTrie) CreateUrlEncodedflag

func (ft *FrozenTrie) CreateUrlEncodedflag(fl []string) string

func (*FrozenTrie) DNlookup

func (ft *FrozenTrie) DNlookup(dn string, usr_flag string) (bool, []string)

func (*FrozenTrie) Dispose

func (f *FrozenTrie) Dispose()

func (*FrozenTrie) FlagstoTag

func (ft *FrozenTrie) FlagstoTag(flags []uint32) []string

func (*FrozenTrie) LoadTag

func (ft *FrozenTrie) LoadTag(filepath string) error

func (*FrozenTrie) Lookup

func (ft *FrozenTrie) Lookup(word []uint8) (bool, []uint32)

func (*FrozenTrie) Sizes

func (f *FrozenTrie) Sizes() string

func (*FrozenTrie) UrlEncodedFlagstrToTags

func (ft *FrozenTrie) UrlEncodedFlagstrToTags(str string) []string

type FrozenTrieNode

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

func NewFrozenTrieNode

func NewFrozenTrieNode(ft *FrozenTrie, index int) *FrozenTrieNode

func (*FrozenTrieNode) String

func (ftn *FrozenTrieNode) String() string

type ReadKind

type ReadKind bool
const Ffull ReadKind = false
const Fmmap ReadKind = true

func (ReadKind) String

func (rk ReadKind) String() string

Jump to

Keyboard shortcuts

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