dummy-link

DiffWrappers

Wrap functions to return DiffResult's with the requested derivatives.

Readme

Deprecation notice

IMPORTANT: this package is now abandoned, please use LogDensityProblems.jl instead.

DiffWrappers

Lifecycle Project Status: Unsupported – The project has reached a stable, usable state but the author(s) have ceased all work on it. A new maintainer may be desired. Build Status Coverage Status codecov.io

Wrap functions so that they return DiffResults with the requested derivatives. Copy values when necessary, so that structure is not shared between evaluations.

Example:

julia> using DiffWrappers

julia> using DiffResults

julia> f(x) = sum(x .* linspace(0, 1, length(x)));

julia> g = ForwardGradientWrapper(f, 4); # will use length 4 vectors

julia> length(g)
4

julia> x = ones(4);

julia> gx = g(x);

julia> DiffResults.value(gx)
2.0

julia> DiffResults.gradient(gx)
4-element Array{Float64,1}:
 0.0
 0.333333
 0.666667
 1.0

First Commit

08/24/2017

Last Touched

5 months ago

Commits

24 commits

Used By: