package wu-manber-fuzzy-search

  1. Overview
  2. Docs

Characters can be enumerated from 0 to some n.

include Elems
type elem

The type of characters in the patterns.

val int_of_elem : elem -> int

Convert elements to int.

val elem_of_int : int -> elem

elem_of_int n should convert an n between 0 and max_elem_index (inclusive) to an element.

val max_elem_index : int

The maximal index for elements. The maximal index should be the last index that an element can be mapped to.

Note: This is 1 less than the total number of elements. For example, there are a total of 256 chars, but char can be enumerated from 0 to 255, so max_elem_index for chars should be 255.