Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Match

type Match struct {
	Ps  []Pos
	Len Pos
}

type Pos

type Pos int32

Pos denotes position in data slice.

type STree

type STree struct {

	// contains filtered or unexported fields

}

STree is a struct representing a suffix tree.

func New

func New() *STree

New creates new suffix tree.

func (*STree) At

func (t *STree) At(p Pos) Token

func (*STree) FindDuplOver

func (t *STree) FindDuplOver(threshold int) <-chan Match

FindDuplOver find pairs of maximal duplicities over a threshold length.

func (*STree) String

func (t *STree) String() string

func (*STree) Update

func (t *STree) Update(data ...Token)

Update refreshes the suffix tree to by new data.

type Token

type Token interface {
	Val() int
}