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.
val make : int -> d -> tmake n x returns an array with n elements each set to x.
val create : int -> tcreate n returns an array with n elements each set to
IncreasingOrDecreasing.
val init : int -> (int -> d) -> tinit n f returns an array with n elements, with element i set
to f i.
val pp : Stdlib.Format.formatter -> t -> unitPretty-print a root direction array using the Format module.
val ppi : ?start:string ->
?stop:string ->
?sep:string ->
?item:(Stdlib.Format.formatter -> int -> d -> unit) ->
unit -> Stdlib.Format.formatter -> t -> unitPretty-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 -> tcopy 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 -> intReturns the length of an array
val get : t -> int -> dget r i returns the ith element of r.
val set : t -> int -> d -> unitset r i v sets the ith element of r to v.
val fill : t -> d -> unitfill_all a x sets the values of a to x everywhere.
val blitn : src:t ->
?spos:int -> dst:t -> ?dpos:int -> int -> unitblitn ~src ?spos ~dst ?dpos len copies len elements of src at
offset spos to dst at offset dpos.
The spos and dpos arguments are optional and default to zero.
Invalid_argument "RootDirs.blitn" if spos, dpos, and
len do not specify valid subarrays of src and dst.val blit : src:t -> dst:t -> unitCopy the first array into the second one.
See
Bigarray.Genarray.blit for more details.
val of_list : d list -> tCreates an array by copying the contents of a d list.
val to_list : t -> d listCopies into a list.
val of_array : d array -> tCreates a new value from the contents of an array.
val to_array : t -> d arrayCreates a new array from the contents of a given value.