Module Sundials.RealArray

module RealArray: sig .. end
Vectors of floats (one-dimensional bigarrays).

type t = (float, Bigarray.float64_elt, Bigarray.c_layout) Bigarray.Array1.t 
A Bigarray of floats.
val make : int -> float -> t
make n x returns an array with n elements each set to x.
val create : int -> t
create n returns an uninitialized array with n elements.
val init : int -> (int -> float) -> t
init n f returns an array with n elements, with element i set to f i.
val pp : Format.formatter -> t -> unit
Pretty-print an array using the Format module.
val ppi : ?start:string ->
?stop:string ->
?sep:string ->
?item:(Format.formatter -> int -> float -> unit) ->
Format.formatter -> t -> unit
Pretty-print an array using the Format module. The defaults are: start="[", stop="]", sep=" ", and item=fun f->Format.fprintf f "%2d=% -15e" (see fprintf).
val of_array : float array -> t
Creates an array by copying the contents of a float array.
val of_list : float list -> t
Creates an array by copying the contents of a float list.
val to_array : t -> float array
Copies into a new float array.
val into_array : t -> float array -> unit
Copies into an existing float array.
val to_list : t -> float list
Copies into a float list.
val copy : t -> t
Creates a new array with the same contents as an existing one.
val sub : t -> int -> int -> t
Access a sub-array of the given array without copying.
val blit_some : t -> int -> t -> int -> int -> unit
blit_some src isrc dst idst len copies len elements of src at offset isrc to dst at offset idst.
Raises Invalid_argument "RealArray.blit_some" if isrc, idst, and len do not specify valid subarrays of src and dst.
val blit : t -> t -> unit
Copy the first array into the second one. See Bigarray.Genarray.blit for more details.
val fill : t -> float -> unit
fill a c sets all elements of a to the constant c.
val length : t -> int
Returns the length of an array.
val fold_left : ('a -> float -> 'a) -> 'a -> t -> 'a
fold_left f b a returns f (f (f b a.{0}) a.{1}) ...).
val fold_right : (float -> 'a -> 'a) -> t -> 'a -> 'a
fold_right f b a returns (f ... (f a.{n-2} (f a.{n-1} b))).
val iter : (float -> unit) -> t -> unit
iter f a successively applies f to the elements of a.
val iteri : (int -> float -> unit) -> t -> unit
iteri f a successively applies f to the indexes and values of a.
val map : (float -> float) -> t -> unit
map f a replaces each element a.{i} with f a.{i}.
val mapi : (int -> float -> float) -> t -> unit
map f a replaces each element a.{i} with f i a.{i}.