Discover Packages
github.com/1995parham/FlashTrie.go
pctrie
package
Version:
v0.0.0-...-8d83361
Opens a new window with list of versions in this module.
Published: Feb 21, 2026
License: GPL-3.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Bitmap represents a compact bit array using uint64 words.
Clear clears the bit at position i.
Get returns true if the bit at position i is set.
Len returns the number of bits in the bitmap.
Ones returns an iterator over the indices of all set bits.
Set sets the bit at position i.
String returns a binary string representation of the bitmap.
type PCTrie[V any ] struct {
Bitmap *Bitmap
NextHops [][]*V
Size int
}
PCTrie represents prefix-compressed trie data structure.
New creates new prefix-compressed trie.
nolint: cyclop, funlen
Lookup looks up given route in pc-trie and returns found value.
Given route must be in binary representation e.g. 111111..
Note that this function assumes that given route length is greater than
original trie height.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.