5 #ifndef BPP_NUMERIC_FUNCTION_BFGSMULTIDIMENSIONS_H 6 #define BPP_NUMERIC_FUNCTION_BFGSMULTIDIMENSIONS_H 9 #include "../VectorTools.h" 37 mutable std::shared_ptr<DirectionFunction>
f1dim_;
65 throw NullPointerException(
"BfgsMultiDimensions::firstOrderDerivableFunction() : no function associated to this optimizer.");
77 throw NullPointerException(
"BfgsMultiDimensions::firstOrderDerivableFunction() : no function associated to this optimizer.");
91 void getGradient(std::vector<double>& gradient)
const;
101 #endif // BPP_NUMERIC_FUNCTION_BFGSMULTIDIMENSIONS_H const FirstOrderDerivable & firstOrderDerivableFunction() const
This is the abstract class for first order derivable functions.
BfgsMultiDimensions(std::shared_ptr< FirstOrderDerivable > function)
std::shared_ptr< FirstOrderDerivable > getFirstOrderDerivableFunction()
std::shared_ptr< FunctionInterface > function_
The function to optimize.
void doInit(const ParameterList ¶ms) override
This function is called by the init() method and contains all calculations.
The parameter list object.
std::shared_ptr< DirectionFunction > f1dim_
FirstOrderDerivable & firstOrderDerivableFunction()
virtual ~BfgsMultiDimensions()
double doStep() override
This function is called by the step() method and contains all calculations.
std::vector< double > Vdouble
The base class exception for NULL pointer error. This exception may be thrown when an unexpected NULL...
Broyden–Fletcher–Goldfarb–Shanno (BFGS) optimization method.
std::shared_ptr< const FirstOrderDerivable > getFirstOrderDerivableFunction() const
Partial implementation of the Optimizer interface.
void getGradient(std::vector< double > &gradient) const
BfgsMultiDimensions * clone() const override
Create a copy of this object and send a pointer to it.
std::vector< Vdouble > VVdouble