Module Fadiff.OrderedFTypeName
Extends FTypeName with comparison operators.
- parameter T
module of operators over the underlying type on which we perform automatic differentiation
Parameters
Signature
include Fadbad__.Types.OrderedOpS with type elt = T.elt and type scalar = T.scalar
include Fadbad__.Types.OpS
type ttype eltType of values: this is the type that the user should use with
makeand that will be returned byget
Constructors
val integer : int -> tWrap an integer
val zero : unit -> tConstruct a fresh value corresponding to 0
val one : unit -> tConstruct a fresh value corresponding to 1
val two : unit -> tConstruct a fresh value corresponding to 2
Destructors
Arithmetic operators
val (+) : t -> t -> tval (+=) : t -> t -> tval (-) : t -> t -> tval (-=) : t -> t -> tval (*) : t -> t -> tval (*=) : t -> t -> tval (/) : t -> t -> tval (/=) : t -> t -> tval (**) : t -> t -> tval inv : t -> tval sqr : t -> tval sqrt : t -> tval log : t -> tval exp : t -> tval sin : t -> tval cos : t -> tval tan : t -> tval asin : t -> tval acos : t -> tval atan : t -> t
Scalar operators
Comparison operators
Additionnal constructors
Accessors
val dim : t -> intSize of differentiation vector
Automatic Differentiation
val diff : t -> int -> int -> unitdiff x i nassignsias index of variablexout ofn
val set_deriv : t -> int -> T.t -> unitset_deriv f i xsets the derivative offwith respect to the variable of indexitox
val d : t -> int -> eltd f iretrieves the derivative of variable of indexiin computationfas anelt
val deriv : t -> int -> T.tderiv f iretrieves the derivative of variable of indexiin computationf
val reset_diff : t -> unit