fmi

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2016 License: GPL-2.0 Imports: 8 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SEQ []byte

Functions

func GetSeq

func GetSeq(seq []byte)

-----------------------------------------------------------------------------

Types

type Index

type Index struct {
	SA  []uint32          // suffix array
	OCC map[byte][]uint32 // occurence table
	C   map[byte]uint32   // count table
	EP  map[byte]uint32   // ending row/position of each symbol

	LEN     uint32
	END_POS uint32          // position of "$" in the text
	SYMBOLS []int           // sorted symbols
	Freq    map[byte]uint32 // Frequency of each symbol
}

func Load

func Load(dirname string) *Index

----------------------------------------------------------------------------- Load FM index. Usage: idx := Load(index_file)

func New

func New(seq []byte) *Index

func (*Index) Save

func (I *Index) Save(dirname string)

-----------------------------------------------------------------------------

type Symb_OCC

type Symb_OCC struct {
	Symb int
	OCC  []uint32
}

type WorkSpace

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

WorkSpace contains the O(1) scratch space used in constructing a suffix array with an alphabet of sisze 256 (any byte value).

func (*WorkSpace) ComputeSuffixArray

func (ws *WorkSpace) ComputeSuffixArray(S []byte, SA []int)

Compute the suffix array of S, storing it into SA. len(S) and len(SA) must be equal.

Jump to

Keyboard shortcuts

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