Module Badiff.OrderedBTypeName
Extends BTypeName
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 t
type elt
Type of values: this is the type that the user should use with
make
and that will be returned byget
Constructors
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
Destructors
Arithmetic operators
val (+) : t -> t -> t
val (+=) : t -> t -> t
val (-) : t -> t -> t
val (-=) : t -> t -> t
val (*) : t -> t -> t
val (*=) : t -> t -> t
val (/) : t -> t -> t
val (/=) : t -> t -> t
val (**) : t -> t -> t
val inv : t -> t
val sqr : t -> t
val sqrt : t -> t
val log : t -> t
val exp : t -> t
val sin : t -> t
val cos : t -> t
val tan : t -> t
val asin : t -> t
val acos : t -> t
val atan : t -> t
Scalar operators
Comparison operators
Operators
Additionnal constructors
Accessors
Automatic Differentiation
val diff : t -> int -> int -> unit
diff x i n
assignsi
as index of variablex
out ofn
val d : t -> int -> elt
d f i
retrieves the derivative of variable of indexi
in computationf
as anelt
. Must be called afterdiff
andcompute
.