Header menu logo BioFSharp

KnuthMorrisPratt Module

A collection of Knuth-Morris-Pratt string matching algorithms

Functions and values

Function or value Description

createPrefixTable pattern

Full Usage: createPrefixTable pattern

Parameters:
    pattern : 'a array

Returns: int[]

creates a prefix table for a query pattern

pattern : 'a array
Returns: int[]

find prefixTable pattern s

Full Usage: find prefixTable pattern s

Parameters:
    prefixTable : int[]
    pattern : 'a array
    s : 'a array

Returns: int

finds the first match of a query pattern in a source using a given prefix table

prefixTable : int[]
pattern : 'a array
s : 'a array
Returns: int

findAll prefixTable pattern s

Full Usage: findAll prefixTable pattern s

Parameters:
    prefixTable : int[]
    pattern : 'a array
    s : 'a array

Returns: int list

finds all matches of a query pattern in a source using a given prefix table

prefixTable : int[]
pattern : 'a array
s : 'a array
Returns: int list

findFrom prefixTable pattern startPos s

Full Usage: findFrom prefixTable pattern startPos s

Parameters:
    prefixTable : int[]
    pattern : 'a array
    startPos : int
    s : 'a array

Returns: int

finds the first match of a query pattern in a source starting from a specific position in the source using a given prefix table

prefixTable : int[]
pattern : 'a array
startPos : int
s : 'a array
Returns: int

initFind pattern

Full Usage: initFind pattern

Parameters:
    pattern : 'a array

Returns: 'a array -> int

returns a find function with a set prefix table created from the input

pattern : 'a array
Returns: 'a array -> int

initFindAll pattern

Full Usage: initFindAll pattern

Parameters:
    pattern : 'a array

Returns: 'a array -> int list

returns a findAll function with a set prefix table created from the input

pattern : 'a array
Returns: 'a array -> int list

initFindFrom pattern

Full Usage: initFindFrom pattern

Parameters:
    pattern : 'a array

Returns: int -> 'a array -> int

returns a findFrom function with a set prefix table created from the input

pattern : 'a array
Returns: int -> 'a array -> int

Type something to start searching.