Frama-C API - Matrix
The call id n returns the identity matrix in 𝕂ⁿˣⁿ.
The call zero n m returns the 0 matrix in 𝕂ⁿˣᵐ.
val of_array : 'n Nat.succ Nat.nat -> 'm Nat.succ Nat.nat -> string array array -> ('n Nat.succ, 'm Nat.succ) matrixBuild a matrix from a 2 dimensionnal array of strings. Strings are used here to ensure that no rounding is performed prior of the ones that may be introduced by the underlying field. Raise out of bounds exceptions if the array is not well formed.
val get : 'n Finite.finite -> 'm Finite.finite -> ('n, 'm) matrix -> scalarThe call get i j m returns the coefficient of the i-th row and the j-th column.
val set : 'n Finite.finite -> 'm Finite.finite -> scalar -> ('n, 'm) matrix -> ('n, 'm) matrixThe call set i j x m returns a new matrix of the same linear space as m, and with the same coefficients, except for the one of the i-th row and the j-th column, which is set to the scalar x.
The call norm_inf m computes the ∞-norm of m, i.e the maximum of the absolute sums of the rows of m.
The call norm_one m computes the 1-norm of m, i.e the maximum of the absolute sums of the columns of m.
The call transpose m for m in 𝕂ⁿˣᵐ returns a new matrix in 𝕂ᵐˣⁿ with all the coefficients transposed.
The call dimensions m for m in 𝕂ⁿˣᵐ returns the pair (n, m).
Matrices addition. The dimensions compatibility is statically ensured.
Matrices subtraction. As for the addition, the dimensions compatibility is statically ensured.
Matrices multiplication. The dimensions compatibility is statically ensured.
Matrix inverse. Returns None if the input matrix is singular.
The call abs m returns a matrix for which each coordinate is the absolute value of the corresponding coordinate of m.
