Skip to content
/ lbfgsd Public

Automatic differentiation and L-BFGS implementation in the D Programming Language.

License

Notifications You must be signed in to change notification settings

lempiji/lbfgsd

Repository files navigation

lbfgsd

Automatic differentiation and L-BFGS implementation in the D Programming Language.

auto solver = new SimpleSolver!(double, 2);

struct Func
{
    T opCall(T)(in T[] x)
    {
        return x[0] * x[0] + x[1] * x[1];
    }
}

Func f;
solver.setAutoDiffCost(f);

auto x = new double[2];
x[] = 1;
solver.solve(x); //solve by L-BFGS
assert(equals(x, [0.0, 0.0]));

About

Automatic differentiation and L-BFGS implementation in the D Programming Language.

Topics

Resources

License

Stars

Watchers

Forks

Languages