Module Sundials.RealArray2

module RealArray2: sig .. end
Matrices of floats (wrappers around two-dimensional bigarrays).

type t 
A two-dimensional matrix. The underlying data can be accessed as a Bigarray via Sundials.RealArray2.unwrap, but note that the first index specifies the column.
type data = (float, Bigarray.float64_elt, Bigarray.c_layout) Bigarray.Array2.t 
An alias for the underlying Bigarray.
val make : int -> int -> float -> t
make nr nc v returns an array with nr rows and nc columns, and with elements set to v.
val create : int -> int -> t
create nr nc returns an uninitialized array with nr rows and nc columns.
val get : t -> int -> int -> float
get a i j returns the value at row i and column j of a.
val col : t -> int -> Sundials.RealArray.t
col a j returns the jth column of a. The slice shares storage with a.
val set : t -> int -> int -> float -> unit
set a i j v sets the value at row i and column j of a to v.
val size : t -> int * int
nr, nc = size a returns the numbers of rows nr and columns nc of a
val pp : Format.formatter -> t -> unit
Pretty-print an array using the Format module.
val ppi : ?start:string ->
?rowstart:string ->
?stop:string ->
?rowstop:string ->
?sep:string ->
?rowsep:string ->
?item:(Format.formatter -> int -> int -> float -> unit) ->
Format.formatter -> t -> unit
Pretty-print an array using the Format module. The defaults are: start="[", stop="]", rowsep=";", indent=4, sep=" ", and item=fun f r c->Format.fprintf f "(%2d,%2d)=% -15e" r c (see fprintf). The indent argument specifies the indent for wrapped rows.
val copy : t -> t
Creates a new array with the same contents as an existing one.
val blit : t -> t -> unit
Copy the first array into the second one. See Bigarray.Genarray.blit for more details.
val make_data : int -> int -> data
make m n returns an uninitialized m by n array.
val wrap : data -> t
Creates a new matrix from an existing Sundials.RealArray2.data array. Changes to one affect the other since they share the same underlying storage.
val unwrap : t -> data
Returns the Sundials.RealArray2.data array behind a matrix. Changes to one affect the other since they share the same underlying storage. Note that the array is accessed column-first, that is, get a i j = (unwrap a).{j, i}.