module Dense:sig..end
Dense matrices
type t
A dense matrix. Values of this type are typically passed to linear
solver callback functions (like Cvode.Dls.jac_fn,
Ida.Dls.jac_fn, and Kinsol.Dls.jac_fn).
val make : int -> int -> float -> tmake m n x returns an m by n dense matrix with elements set
to x.
val create : int -> int -> tcreate m n returns an uninitialized m by n dense matrix.
val size : t -> int * intm, n = size a returns the numbers of rows m and columns n
of a.
val pp : Stdlib.Format.formatter -> t -> unitPretty-print a dense matrix using the Format module.
val ppi : ?start:string ->
?stop:string ->
?sep:string ->
?indent:int ->
?itemsep:string ->
?item:(Stdlib.Format.formatter -> int -> int -> float -> unit) ->
unit -> Stdlib.Format.formatter -> t -> unitval get : t -> int -> int -> floatget a i j returns the value at row i and column j of a.
val set : t -> int -> int -> float -> unitset a i j v sets the value at row i and column j of a to v.
val update : t -> int -> int -> (float -> float) -> unitupdate a i j f sets the value at row i and column j of a
to f v.
val unwrap : t -> Sundials.RealArray2.dataDirect access to the underlying storage array, which is accessed
column first (unlike in Sundials_Matrix.Dense.get).
NB: For Config.sundials_version < 3.0.0, this access is potentially unsafe and must only be used when the underlying storage is valid, which will be the case in callbacks.
val ops : (t, Nvector_serial.data) Sundials_Matrix.matrix_opsOperations on dense matrices.
val scale_add : float -> t -> t -> unitscale_add c A B calculates $A = cA + B$.
val scale_addi : float -> t -> unitscale_addi c A calculates $A = cA + I$.
val matvec : t ->
Sundials.RealArray.t -> Sundials.RealArray.t -> unitThe call matvec a x y computes the matrix-vector product $y = Ax$.
val set_to_zero : t -> unitFills a matrix with zeros.
val blit : src:t -> dst:t -> unitblit ~src ~dst copies the contents of src into dst. Both
must have the same size.
val space : t -> int * intlrw, liw = space a returns the storage requirements of a as
lrw realtype words and liw integer words.
val invalidate : t -> unitCalled internally when the corresponding value in the underlying library ceases to exist. Has no effect when Config.sundials_version >= 3.0.0.