[][src]Function dual_num::partials

pub fn partials<T: Real + Num, M: DimName, N: DimName, F>(
    x: VectorN<T, M>,
    f: F
) -> (VectorN<T, N>, MatrixMN<T, N, M>) where
    F: Fn(&MatrixMN<Dual<T>, M, M>) -> MatrixMN<Dual<T>, N, M>,
    DefaultAllocator: Allocator<Dual<T>, M> + Allocator<Dual<T>, N, M> + Allocator<Dual<T>, M, M> + Allocator<T, N> + Allocator<T, M> + Allocator<T, N, M>, 

Computes the state and partials of the provided function.

How to read this signature:

Let x be a state vector and f be a function whose gradient is seeked. Calling partials will return a tuple of ( f(x), ∂f(x)/∂x ). If the function f is defined as f: Y^{n} → Y^{n}, where Y is a given group, than partials returns the evaluation and gradient of f at position x, i.e. a tuple of ( f(x), ∇f(x) ).