API
API for TaylorDiff.
TaylorDiff.TaylorArray — TypeTaylorArray{T, N, A, P}Representation of Taylor polynomials in array mode.
Fields
- value::A: zeroth order coefficient
- partials::NTuple{P, A}: i-th element of this stores the i-th derivative
TaylorDiff.TaylorScalar — TypeTaylorScalar{T, P}Representation of Taylor polynomials.
Fields
- value::T: zeroth order coefficient
- partials::NTuple{P, T}: i-th element of this stores the i-th derivative
TaylorDiff.TaylorScalar — MethodTaylorScalar{P}(value::T, seed::T)Convenience function: construct a Taylor polynomial with zeroth and first order coefficient, acting as a seed.
TaylorDiff.TaylorScalar — MethodTaylorScalar{P}(value::T) where {T, P}Convenience function: construct a Taylor polynomial with zeroth order coefficient.
TaylorDiff.can_taylorize — MethodTaylorDiff.can_taylorize(V::Type)Determines whether the type V is allowed as the scalar type in a Dual. By default, only <:Number types are allowed.
TaylorDiff.derivative — Functionderivative(f, x, ::Val{P})
derivative(f, x, l, ::Val{P})
derivative(f!, y, x, l, ::Val{P})Computes P-th directional derivative of f w.r.t. vector x in direction l. If x is a Number, the direction l can be omitted.
TaylorDiff.derivative! — Functionderivative!(result, f, x, l, ::Val{P})
derivative!(result, f!, y, x, l, ::Val{P})In-place derivative calculation APIs. result is expected to be pre-allocated and have the same shape as y.
TaylorDiff.derivatives — Functionderivatives(f, x, l, ::Val{P})
derivatives(f!, y, x, l, ::Val{P})Computes all derivatives of f at x up to order P.
TaylorDiff.get_term_raiser — MethodPick a strategy for raising the derivative of a function. If the derivative is like 1 over something, raise with the division rule; otherwise, raise with the multiplication rule.
TaylorDiff.@immutable — Macroimmutable(def)Transform a function definition to a @generated function.
- Allocations are removed by replacing the output with scalar variables;
- Loops are unrolled;
- Indices are modified to use 1-based indexing;