module BC_Indexing: sig end
Alphabet Indexing functions
Author(s): Hideo Bannai
type indexing = {
|
mutable size : int; |
(* | The indexing alphabet size | *) |
|
mutable alph : string; |
(* | The input alphabet | *) |
|
mutable conv : char array; |
(* | conversion array | *) |
}
the type for an alphabet indexing
val indexing_alphabet : indexing -> string
return indexing alphabet "0...8"
val convfunc_of_ind : indexing -> char -> char
return function: char -> char corresponding to the indexing
val conv : indexing -> string -> string
convert a string according to an indexing
val create : int -> (string * int) list -> indexing
create a indexing with indexing alphabet size,
and list of classifications
e.g: create 2 [("ab", 0); ("def", 1)]
creates a indexing of indexing alphabet size 2 which maps "ab" to
0, and "def" to 1, and other characters to 2. The alphabet is
automatically extracted from the list. Raises Invalid_argument if a
character appears in multiple classifications, or if the indexing
value is greater than size
val create_random : string -> int -> indexing
create a random indexing from alphabet and indexing size
string should contain letters of the original alphabet
indexing size greater than 0 and less than 10, otherwise
raises Invalid_argument
val neighbors : indexing -> indexing list
generate the neighborhood of a given indexing
val to_string : indexing -> string
create string of indexing
val serialize : indexing -> string
create internal representation of indexing.
(so can be cut-and-pasted into code)