package phylogenetics
Module A.Matrix
type symbol = tinclude Linear_algebra.Matrix with type t = matrix and type vec := vector
type t = matrixval dim : t -> int * intMatrix and vector creation
Initializes a square diagonal matrix from the vector of its diagonal elements.
val inplace_scal_mul : float -> t -> unitInplace multiplication of a matrix by a scalar.
Compares two matrices and tolerates a certain relative difference. Let f be the float parameter, it returns true iff the elements of the second matrix are between 1-f and 1+f times the corresponding elements of the first
val get : t -> int -> int -> floatAccess a specific element of a matrix.
val set : t -> int -> int -> float -> unitSet a specific element of a matrix.
Diagonalizes a matrix M so that M = PxDxP^T; returns (v,P) where v is the diagonal vector of D.
zero_eigen_vector m is a vector v such that Vec.sum v = 1 and mat_vec_mul m v = zero
val pp : Format.formatter -> t -> unitPrints a matrix to the standard output (display may be messy).
val of_arrays : float array array -> matrix optionval of_arrays_exn : float array array -> matrix