sig
  module Simple :
    sig
      type ('a, 'b, 'c) matrix = {
        mat_i : 'a array;
        mat_j : 'b array;
        mat_mat : 'c array array;
      }
      val latex :
        Pervasives.out_channel ->
        ?cols:int ->
        ('-> string) ->
        ('-> string) ->
        ('-> string) -> ('a, 'b, 'c) Smatrices.Simple.matrix -> unit
      val store_matrix :
        string -> ('a, 'b, 'c) Smatrices.Simple.matrix -> unit
      val load_matrix : string -> ('a, 'b, 'c) Smatrices.Simple.matrix
      exception Uncompatible_matrices
      val concat_matrices_i :
        ?check:('-> '-> unit) ->
        ('a, 'b, 'c) Smatrices.Simple.matrix ->
        ('a, 'b, 'c) Smatrices.Simple.matrix ->
        ('a, 'b, 'c) Smatrices.Simple.matrix
      val concat_matrices_j :
        ?check:('-> '-> unit) ->
        ('a, 'b, 'c) Smatrices.Simple.matrix ->
        ('a, 'b, 'c) Smatrices.Simple.matrix ->
        ('a, 'b, 'c) Smatrices.Simple.matrix
    end
  module Distances :
    sig
      type ('a, 'b) dist_matrix = {
        dist_elements : 'a array;
        dist_matrix : 'b array array;
        dist_samples : int array;
      }
      val make_matrix :
        ?commutative:bool ->
        ('-> '-> 'b) ->
        '-> 'a array -> ('a, 'b) Smatrices.Distances.dist_matrix
      val group_distances :
        ?commutative:bool ->
        ('-> 'b) ->
        intra:('c list list -> 'c) ->
        inter:('c list list -> 'c) ->
        ('a, 'c) Smatrices.Distances.dist_matrix ->
        ('b, 'c) Smatrices.Distances.dist_matrix
      val latex :
        Pervasives.out_channel ->
        ?samples_in_rows:bool ->
        ?cols:int ->
        ?fill:bool ->
        ?rotate_titles:bool ->
        ('-> string) ->
        ('-> string) -> ('a, 'b) Smatrices.Distances.dist_matrix -> unit
      val latex_sorted_dists :
        Pervasives.out_channel ->
        ('-> string) ->
        ('-> string) ->
        ('-> '-> int) -> ('a, 'b) Smatrices.Distances.dist_matrix -> unit
      val store_dist_matrix :
        string -> ('a, 'b) Smatrices.Distances.dist_matrix -> unit
      val load_dist_matrix :
        string -> ('a, 'b) Smatrices.Distances.dist_matrix
    end
end