Module Sundials.RootDirs

module RootDirs: sig .. end
Vectors of root (zero-crossing) directions.

type t 
Arrays that communicate which zero-crossings are sought. The underlying representation is hidden to isolate compatability issues related to integers.
type d = 
| Increasing (*
Only look for rising zero-crossings.
*)
| Decreasing (*
Only look for falling zero-crossings.
*)
| IncreasingOrDecreasing (*
Look for any zero-crossing.
*)
Values indicating which types of roots are sought.
See sundials: CVodeSetRootDirection
See sundials: IdaSetRootDirection
val make : int -> d -> t
make n x returns an array with n elements each set to x.
val create : int -> t
create n returns an array with n elements each set to IncreasingOrDecreasing.
val init : int -> (int -> d) -> 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 a root direction array using the Format module.
val ppi : ?start:string ->
?stop:string ->
?sep:string ->
?item:(Format.formatter -> int -> d -> unit) ->
Format.formatter -> t -> unit
Pretty-print a root direction array using the Format module. The defaults are: start="[", stop="]", sep="; ", and item prints 'R' for Increasing, 'F' for Decreasing, and 'E' (either) for IncreasingOrDecreasing.
val copy : int -> d array -> t
copy n a returns an array with n elements, initialized from the contents of a. If n > Array.length a then the extra space is initialized to IncreasingOrDecreasing.
val length : t -> int
Returns the length of an array
val get : t -> int -> d
get r i returns the ith element of r.
val set : t -> int -> d -> unit
set r i v sets the ith element of r to v.
val fill : t -> d -> unit
fill_all a x sets the values of a to x everywhere.
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 "RootDirs.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 of_list : d list -> t
Creates an array by copying the contents of a d list.
val to_list : t -> d list
Copies into a list.
val of_array : d array -> t
Creates a new value from the contents of an array.
val to_array : t -> d array
Creates a new array from the contents of a given value.