module Matrix: sig .. end
Operations on matrices.
Author(s): David Baelde, Samuel Mimram
type t = float array array
val copy : 'a array array -> 'a array array
val mult : float array array -> float array array -> float array array
Internal use
exception Found of int
exception Error of float
val error : float array -> float array -> float
val print_sys : float array array -> float array -> unit
print_sys m b displays the system m * x = b in a very verbose way.
val print_sys_silhouette : float array array -> float array -> unit
print_sys_silhouette m b does as print_sys m b but is more visual.
It prints out a '*' for non-zero values and a ' ' for zero.
val nearly_zero : float -> bool
nearly_zero f tells whether f should be neglected or not.
Conversions from and to vectors
val of_vector_v : float array -> float array array
val of_vector_h : 'a -> 'a array
val to_vector_v : 'a array array -> 'a array
val to_vector_h : 'a array -> 'a
Solving linear systems
val gauss : float array array -> float array -> unit
gauss m b transforms m and b such that m is upper triangular,
without changing the set of solutions of m*X=b.
exception Unsolvable
val basic_solve : float array array -> float array -> float array
Solves a upper triangular system.
Raises Unsolvable if the system cannot be solved.
val solve : float array array -> float array -> float array
solve a b solves any system -- at least it tries.
a and b can be modified since solve uses gauss.