Module Cgr.Neighbor


module Neighbor: Cgr_neighbor
Creating tree with the Neighbor-joining clustering method. Output in newick and dot formats.


type 'a ind =
| Ind_leaf of 'a
| Ind_node of (float * 'a ind) list
type 'a matrix = 'a ind array * float array array 

type 'a tree =
| Leaf of 'a
| Node of (float * 'a tree) list
val build_tree : ('a -> string) ->
'a ind array * float array array -> 'a tree
val print_input_matrix : ('a -> string) ->
Pervasives.out_channel ->
'a ind array * float array array -> unit
val string_of_ind : ('a -> string) -> 'a ind -> string
val dot_of_tree : Pervasives.out_channel ->
?f_color:('a -> string option) ->
('a -> string) -> 'a tree -> unit
val string_newick : ('a -> string) -> 'a tree -> string
val add_lineage_distances : ('a -> string) ->
'a tree ->
(int * 'a -> string) * (int * 'a -> string option) *
(int * 'a) tree