MADNESS 0.10.1
|
Wrapper around vector demonstrating interface necessary. More...
Public Member Functions | |
Fred (const Fred &f) | |
Fred (const Tensor< double > f, const Tensor< double > x, const Tensor< double > w, const double mu, const double p) | |
Fred (double a, double b, double c) | |
string | a (const string &input) const |
string | b (const string &input) const |
double | get (int i) const |
Tensor< double > | gradient (const Tensor< double > &expnt) |
Should return the derivative of the function. | |
Fred | operator* (const double &d) const |
Fred & | operator+= (const Fred &f) |
Fred & | operator= (const Fred &f) |
bool | provides_gradient () const |
Override this to return true if the derivative is implemented. | |
void | set (int i, double a) |
double | value (const Tensor< double > &expnt) |
Should return the value of the objective function. | |
void | value_and_gradient (const Tensor< double > &expnt, double &value, Tensor< double > &gradient) |
Reimplement if more efficient to evaluate both value and gradient in one call. | |
Public Member Functions inherited from madness::OptimizationTargetInterface | |
virtual | ~OptimizationTargetInterface () |
double | test_gradient (Tensor< double > &x, double value_precision, bool doprint=true) |
Numerical test of the derivative ... optionally prints to stdout, returns max abs error. | |
Private Member Functions | |
Fred () | |
double | dpenalty (double expnt) const |
Tensor< double > | make_g (const Tensor< double > &expnt) |
Makes the matrix of Gaussians g(i,j) = myexp(-expnt[j]*x[i]x[i]) | |
double | penalty (double expnt) const |
Private Attributes | |
const double | alpha |
const Tensor< double > | f |
const double | mu |
const long | nx |
const double | p |
std::vector< double > | v |
const Tensor< double > | w |
const Tensor< double > | x |
Wrapper around vector demonstrating interface necessary.
|
private |
|
inline |
|
inline |
|
inline |
Referenced by main().
|
inline |
Referenced by main().
|
inlineprivate |
References alpha.
Referenced by value_and_gradient().
Should return the derivative of the function.
Reimplemented from madness::OptimizationTargetInterface.
References errsq(), madness::g, and value_and_gradient().
Referenced by value(), and value_and_gradient().
Makes the matrix of Gaussians g(i,j) = myexp(-expnt[j]*x[i]x[i])
References madness::g, myexp(), nx, madness::BaseTensor::size(), and x.
Referenced by value_and_gradient().
|
inlineprivate |
References alpha.
Referenced by value_and_gradient().
|
inlinevirtual |
Override this to return true if the derivative is implemented.
Reimplemented from madness::OptimizationTargetInterface.
|
inlinevirtual |
Should return the value of the objective function.
Implements madness::OptimizationTargetInterface.
References errsq(), gradient(), and value_and_gradient().
Referenced by value_and_gradient().
|
inlinevirtual |
Reimplement if more efficient to evaluate both value and gradient in one call.
Reimplemented from madness::OptimizationTargetInterface.
References c, dpenalty(), e(), errsq(), f, madness::g, gradient(), make_g(), mu, nx, optimize_coeffs(), p, penalty(), pow(), madness::BaseTensor::size(), v, value(), w, and x.
Referenced by gradient(), and value().
|
private |
Referenced by dpenalty(), and penalty().
|
private |
Referenced by operator*(), operator+=(), operator=(), and value_and_gradient().
|
private |
Referenced by value_and_gradient().
|
private |
Referenced by make_g(), and value_and_gradient().
|
private |
Referenced by value_and_gradient().
|
private |
Referenced by Fred(), get(), operator+=(), operator=(), set(), and value_and_gradient().
|
private |
Referenced by value_and_gradient().
|
private |
Referenced by make_g(), and value_and_gradient().