Flibdivsufsort


Flibdivsufsort

Documentation

The Flibdivsufsort library can be installed from NuGet:
PM> Install-Package Flibdivsufsort

Example

This example demonstrates using a function defined in this sample library.

1: 
2: 
3: 
4: 
5: 
6: 
7: 
8: 
9: 
#r @"Flibdivsufsort.dll"
open Flibdivsufsort
open System.Text

let makeStringSuffixArray (text: string) =    
    new SuffixArray(Encoding.ASCII.GetBytes(text.ToUpperInvariant()))

let searchStringSuffixArray (pattern: string) (sa: SuffixArray) =
    sa.Search(Encoding.ASCII.GetBytes(pattern))

Some more info

Samples & documentation

The library comes with comprehensible documentation. It can include tutorials automatically generated from *.fsx files in the content folder. The API reference is automatically generated from Markdown comments in the library implementation.

  • Tutorial contains a further explanation of this sample library.

  • API Reference contains automatically generated documentation for all types, modules and functions in the library. This includes additional brief samples on using most of the functions.

Contributing and copyright

The project is hosted on GitHub where you can report issues, fork the project and submit pull requests. If you're adding a new public API, please also consider adding samples that can be turned into a documentation. You might also want to read the library design notes to understand how it works.

The library is available under Public Domain license, which allows modification and redistribution for both commercial and non-commercial purposes. For more information see the License file in the GitHub repository.

module Flibdivsufsort
namespace System
namespace System.Text
val makeStringSuffixArray : text:string -> SuffixArray

Full name: Index.makeStringSuffixArray
val text : string
Multiple items
val string : value:'T -> string

Full name: Microsoft.FSharp.Core.Operators.string

--------------------
type string = System.String

Full name: Microsoft.FSharp.Core.string
Multiple items
type SuffixArray =
  new : input:byte [] -> SuffixArray
  member IsCorrect : unit -> bool
  member Search : query:byte [] -> int64 []

Full name: Flibdivsufsort.SuffixArray

--------------------
new : input:byte [] -> SuffixArray
type Encoding =
  member BodyName : string
  member Clone : unit -> obj
  member CodePage : int
  member DecoderFallback : DecoderFallback with get, set
  member EncoderFallback : EncoderFallback with get, set
  member EncodingName : string
  member Equals : value:obj -> bool
  member GetByteCount : chars:char[] -> int + 3 overloads
  member GetBytes : chars:char[] -> byte[] + 5 overloads
  member GetCharCount : bytes:byte[] -> int + 2 overloads
  ...

Full name: System.Text.Encoding
property Encoding.ASCII: Encoding
Encoding.GetBytes(s: string) : byte []
Encoding.GetBytes(chars: char []) : byte []
Encoding.GetBytes(chars: char [], index: int, count: int) : byte []
Encoding.GetBytes(chars: nativeptr<char>, charCount: int, bytes: nativeptr<byte>, byteCount: int) : int
Encoding.GetBytes(s: string, charIndex: int, charCount: int, bytes: byte [], byteIndex: int) : int
Encoding.GetBytes(chars: char [], charIndex: int, charCount: int, bytes: byte [], byteIndex: int) : int
System.String.ToUpperInvariant() : string
val searchStringSuffixArray : pattern:string -> sa:SuffixArray -> int64 []

Full name: Index.searchStringSuffixArray
val pattern : string
val sa : SuffixArray
member SuffixArray.Search : query:byte [] -> int64 []
Fork me on GitHub