package phylogenetics

  1. Overview
  2. Docs
type ('n, 'l, 'b) t =
  1. | Node of {
    1. data : 'n;
    2. branches : ('n, 'l, 'b) branch List1.t;
    }
  2. | Leaf of 'l
and ('n, 'l, 'b) branch =
  1. | Branch of {
    1. data : 'b;
    2. tip : ('n, 'l, 'b) t;
    }
val leaf : 'l -> (_, 'l, 'b) t
val node : 'a -> ('a, 'b, 'c) branch List1.t -> ('a, 'b, 'c) t
val binary_node : 'a -> ('a, 'b, 'c) branch -> ('a, 'b, 'c) branch -> ('a, 'b, 'c) t
val branch : 'c -> ('a, 'b, 'c) t -> ('a, 'b, 'c) branch
val data : ('a, 'a, _) t -> 'a
val to_printbox : ?node:('n -> string) -> ?leaf:('l -> string) -> ?branch:('b -> string option) -> ('n, 'l, 'b) t -> PrintBox.t
val map : ('a, 'b, 'c) t -> node:('a -> 'd) -> leaf:('b -> 'e) -> branch:('c -> 'f) -> ('d, 'e, 'f) t
val map2_exn : ('a, 'b, 'c) t -> ('d, 'e, 'f) t -> node:('a -> 'd -> 'x) -> leaf:('b -> 'e -> 'y) -> branch:('c -> 'f -> 'z) -> ('x, 'y, 'z) t
val map_branch2_exn : ('a, 'b, 'c) branch -> ('d, 'e, 'f) branch -> node:('a -> 'd -> 'x) -> leaf:('b -> 'e -> 'y) -> branch:('c -> 'f -> 'z) -> ('x, 'y, 'z) branch
val propagate : ('n, 'l, 'b) t -> init:'d -> node:('d -> 'n -> 'd) -> leaf:('d -> 'l -> 'e) -> branch:('d -> 'b -> 'd) -> ('d, 'e, 'b) t
val prefix_traversal : ('n, 'l, 'b) t -> init:'c -> node:('c -> 'n -> 'c) -> leaf:('c -> 'l -> 'c) -> branch:('c -> 'b -> 'c) -> 'c
val leaves : (_, 'l, _) t -> 'l list
val fold_leaves : (_, 'l, _) t -> init:'a -> f:('a -> 'l -> 'a) -> 'a
val unfold : ('n, 'l, 'b) t -> init:'a -> branch:('e -> 'b -> 'a * 'bb) -> leaf:('a -> 'l -> 'e * 'll) -> node:('a -> 'n -> 'e * 'nn) -> ('nn, 'll, 'bb) t
val leafset_generated_subtree : ('n, 'l, 'b) t -> ('l -> string option) -> string list -> ('n, 'l, 'b) t option

leafset_generated_subtree t f xs returns the maximal subtree of t whose leaves all return a string in xs when applied to f if it exists (and None otherwise)

val simplify_node_with_single_child : merge_branch_data:('b list -> 'b) -> ('n, 'l, 'b) t -> ('n, 'l, 'b) t
OCaml

Innovation. Community. Security.