Documentation ¶
Overview ¶
Implements FM-Index (https://en.wikipedia.org/wiki/FM-index), full-text substring index based on the Burrows-Wheeler transform. One should use "index/suffixarray" pkg
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BWT ¶
Naive string matrix sorting (via priority queue) Uses U+0003(\u0003) End-of-text (ETX) character to indicate text end and separate rotations maxDepth < 1 will sort full text, otherwise prefixes are sorted
func ReverseRunes ¶
func ReverseRunes(data interface{}) (res []rune)
Works with string, []byte, []rune
Types ¶
type Index ¶
type Index struct { SuffixArr []int LastCol []rune SymbolsOccurCountByPos map[rune][]int FirstOccurPos map[rune]int }
BWT FM-index
func (*Index) Lookup ¶
Can't find deletions or insertions, only substitution Works with string, []byte, []rune
func (*Index) LookupMismatches ¶
When threshold < 1 will reuse Index.Lookup method.
Click to show internal directories.
Click to hide internal directories.