NPL
Neurological Programs and Libraries
|
Classes | |
class | npl::BFGSOpt |
class | npl::GradientOpt |
class | npl::LBFGSOpt |
Limited-Memory Broyden–Fletcher–Goldfarb–Shanno Algorithm based on "A
Limited Memory Algorithm for Bound Constrained Optimization" Richard H. Byrd, Peihuang Lu, Jorge Nocedal, and Ciyou Zhu http://dx.doi.org/10.1137/0916069. More... | |
class | npl::Optimizer |
Typedefs | |
typedef function< int(const VectorXd &x, double &v, VectorXd &g)> | npl::ValGradFunc |
Value and Gradient Computation Function. More... | |
typedef function< int(const VectorXd &x, VectorXd &g)> | npl::GradFunc |
Gradient Only Computation Function. More... | |
typedef function< int(const VectorXd &x, double &v)> | npl::ValFunc |
Value Only Computation Function. More... | |
typedef function< int(const VectorXd &x, double v, const VectorXd &g, size_t iter)> | npl::CallBackFunc |
Callback function. More... | |
Enumerations | |
enum | npl::StopReason { npl::ENDGRAD, npl::ENDSTEP, npl::ENDVALUE, npl::ENDABSVALUE, npl::ENDITERS, npl::ENDFAIL } |
Functions | |
int | npl::testgrad (double &error, const VectorXd &x, double stepsize, double tol, const ValFunc &valfunc, const ValGradFunc &valgradfunc) |
Tests a gradient function using the value function. More... | |
int | npl::testgrad (double &error, const VectorXd &x, double stepsize, double tol, const ValFunc &valfunc, const GradFunc &gradfunc) |
Tests a gradient function using the value function. More... | |
int | npl::gRosenbrock_G (const VectorXd &x, VectorXd &gradient) |
Implements generized rosenbrock gradient. More... | |
int | npl::gRosenbrock_V (const VectorXd &x, double &v) |
Implements generized rosenbrock value. More... | |
void | npl::gRosenbrock_callCounts (size_t &vcalls, size_t &gcalls) |
Returns the number of times the Value and Gradient functions for the Generalized Rosenbrock Function were called. More... | |
int | npl::noopCallback (const VectorXd &x, double value, const VectorXd &grad, size_t iter) |
Callback that does nothing. More... | |
typedef function<int(const VectorXd& x, double v, const VectorXd& g, size_t iter)> npl::CallBackFunc |
typedef function<int(const VectorXd& x, VectorXd& g)> npl::GradFunc |
typedef function<int(const VectorXd& x, double& v)> npl::ValFunc |
typedef function<int(const VectorXd& x, double& v, VectorXd& g)> npl::ValGradFunc |
enum npl::StopReason |
void npl::gRosenbrock_callCounts | ( | size_t & | vcalls, |
size_t & | gcalls | ||
) |
Returns the number of times the Value and Gradient functions for the Generalized Rosenbrock Function were called.
vcalls | Value calls |
gcalls | Gradient calls |
int npl::gRosenbrock_G | ( | const VectorXd & | x, |
VectorXd & | gradient | ||
) |
Implements generized rosenbrock gradient.
x | Position vector |
gradient | Gradient at the position |
int npl::gRosenbrock_V | ( | const VectorXd & | x, |
double & | v | ||
) |
Implements generized rosenbrock value.
x | Position vector |
v | values |
|
inline |
int npl::testgrad | ( | double & | error, |
const VectorXd & | x, | ||
double | stepsize, | ||
double | tol, | ||
const ValFunc & | valfunc, | ||
const ValGradFunc & | valgradfunc | ||
) |
Tests a gradient function using the value function.
error | Error between analytical and numeric gradient |
x | Position to test |
stepsize | Step to take when testing gradient (will be taken in each dimension successively) |
tol | Tolerance, error below the tolerance will cause the function to return 0, higher error will cause the function to return -1 |
valfunc | Function values compute |
valgradfunc | Function gradient compute |
int npl::testgrad | ( | double & | error, |
const VectorXd & | x, | ||
double | stepsize, | ||
double | tol, | ||
const ValFunc & | valfunc, | ||
const GradFunc & | gradfunc | ||
) |
Tests a gradient function using the value function.
error | Error between analytical and numeric gradient |
x | Position to test |
stepsize | Step to take when testing gradient (will be taken in each dimension successively) |
tol | Tolerance, error below the tolerance will cause the function to return 0, higher error will cause the function to return -1 |
valfunc | Function values compute |
gradfunc | Function gradient compute |