Library
Module
Module type
Parameter
Class
Class type
Re-define usual operators to compute values and derivatives for elements of type T.t in forward mode.
module T : sig ... end
type elt = T.elt
Type of values: this is the type that the user should use with make
and that will be returned by get
type scalar = T.scalar
Type of scalars
val create : unit -> t
val integer : int -> t
Wrap an integer
val zero : unit -> t
Construct a fresh value corresponding to 0
val one : unit -> t
Construct a fresh value corresponding to 1
val two : unit -> t
Construct a fresh value corresponding to 2
val to_string : t -> string
val string_of_scalar : scalar -> string
val string_of_elt : elt -> string
val dim : t -> int
Size of differentiation vector
val diff : t -> int -> int -> unit
diff x i n
assigns i
as index of variable x
out of n
d f i
retrieves the derivative of variable of index i
in computation f
as an elt
set_deriv f i x
sets the derivative of f
with respect to the variable of index i
to x
deriv f i
retrieves the derivative of variable of index i
in computation f
val reset_diff : t -> unit