Inheritance diagram for Purple::NewtonMethod:
Public Member Functions | |
NewtonMethod (ObjectiveFunction *) | |
NewtonMethod (void) | |
virtual | ~NewtonMethod (void) |
Vector< double > | getInitialArgument (void) |
double | getGradientNormGoal (void) |
int | getMaximumNumberOfIterations (void) |
int | getShowPeriod (void) |
void | setInitialArgument (Vector< double >) |
void | setGradientNormGoal (double) |
void | setMaximumNumberOfIterations (int) |
void | setShowPeriod (int) |
Vector< double > | getMinimalArgument (void) |
void | print (void) |
void | load (char *) |
void | save (char *) |
void | saveOptimizationHistory (char *) |
Private Attributes | |
Vector< double > | initialArgument |
double | gradientNormGoal |
int | maximumNumberOfIterations |
int | showPeriod |
Vector< double > | evaluationHistory |
Vector< double > | gradientNormHistory |
Definition at line 29 of file NewtonMethod.h.
Purple::NewtonMethod::NewtonMethod | ( | ObjectiveFunction * | newObjectiveFunction | ) |
General constructor. It creates a Newton's method object associated to an objective function object. It also initializes the class members to their default values:
Initial argument: Random point whithin the objective function domain.
Stopping criteria:
User stuff:
newObjectiveFunction,: | Pointer to an objective function object. |
Definition at line 50 of file NewtonMethod.cpp.
Purple::NewtonMethod::NewtonMethod | ( | void | ) |
Default constructor. It creates a Newton's method optimization algorithm object not associated to any objective function object. It also initializes the class members to their default values:
Stopping criteria:
User stuff:
Definition at line 106 of file NewtonMethod.cpp.
Purple::NewtonMethod::~NewtonMethod | ( | void | ) | [virtual] |
Vector< double > Purple::NewtonMethod::getInitialArgument | ( | void | ) |
This method returns the initial objective function argument to be used by the Newton's method for optimization.
Definition at line 139 of file NewtonMethod.cpp.
double Purple::NewtonMethod::getGradientNormGoal | ( | void | ) |
This method returns the goal value for the norm of the objective function gradient. This is used as a stopping criterium when optimizing a function.
Definition at line 151 of file NewtonMethod.cpp.
int Purple::NewtonMethod::getMaximumNumberOfIterations | ( | void | ) |
This method returns the maximum number of iterations to be performed by the Newton's method during the optimization process. This is used as a stopping criterium when optimizing an objective function.
Definition at line 163 of file NewtonMethod.cpp.
int Purple::NewtonMethod::getShowPeriod | ( | void | ) |
This method returns the number of iterations between the optimization showing progress.
Definition at line 174 of file NewtonMethod.cpp.
void Purple::NewtonMethod::setInitialArgument | ( | Vector< double > | newInitialArgument | ) |
This method sets a new initial objective function argument to be used by the Newton's method for optimization.
newInitialArgument,: | Initial argument Vector. |
Definition at line 187 of file NewtonMethod.cpp.
void Purple::NewtonMethod::setGradientNormGoal | ( | double | newGradientNormGoal | ) |
This method sets a new the goal value for the norm of the objective function gradient. This is used as a stopping criterium when optimizing an objective function.
newGradientNormGoal,: | Goal value for the norm of the objective function gradient. |
Definition at line 218 of file NewtonMethod.cpp.
void Purple::NewtonMethod::setMaximumNumberOfIterations | ( | int | newMaximumNumberOfIterations | ) |
This method sets a new maximum number of iterations in the optimization process.
newMaximumNumberOfIterations,: | Maximum number of iterations. |
Definition at line 245 of file NewtonMethod.cpp.
void Purple::NewtonMethod::setShowPeriod | ( | int | newShowPeriod | ) |
This method sets a new number of iterations between the optimization showing progress.
newShowPeriod,: | Show period. |
Definition at line 274 of file NewtonMethod.cpp.
Vector< double > Purple::NewtonMethod::getMinimalArgument | ( | void | ) | [virtual] |
This method optimizes an objective function according to the Newton's method. It returns the minimal argument of the objective function. Optimization occurs according to the optimization parameters.
Implements Purple::OptimizationAlgorithm.
Definition at line 301 of file NewtonMethod.cpp.
void Purple::NewtonMethod::print | ( | void | ) |
This method prints to the screen the initial argumetn and the stopping criteria concerning the Newton's method object:
Initial argument.
Stopping criteria:
User stuff:
Definition at line 568 of file NewtonMethod.cpp.
void Purple::NewtonMethod::load | ( | char * | filename | ) |
This method loads a Newton method object from a data file. Please mind about the file format, wich is specified in the User's Guide.
Initial argument.
Stopping criteria:
User stuff:
filename,: | Filename. |
Definition at line 723 of file NewtonMethod.cpp.
void Purple::NewtonMethod::save | ( | char * | filename | ) |
This method saves the Newton's method object to a data file.
Initial argument.
Stopping criteria:
User stuff:
filename,: | Filename. |
Definition at line 634 of file NewtonMethod.cpp.
void Purple::NewtonMethod::saveOptimizationHistory | ( | char * | filename | ) |
This method saves the optimization history to a data file:
filename,: | Filename. |
Definition at line 816 of file NewtonMethod.cpp.
Vector<double> Purple::NewtonMethod::initialArgument [private] |
double Purple::NewtonMethod::gradientNormGoal [private] |
Objective function gradient norm goal. It is used as a stopping criterion.
Definition at line 41 of file NewtonMethod.h.
int Purple::NewtonMethod::maximumNumberOfIterations [private] |
Maximum number of iterations. It is used as a stopping criterion.
Definition at line 46 of file NewtonMethod.h.
int Purple::NewtonMethod::showPeriod [private] |
Number of iterations between the training showing progress.
Definition at line 50 of file NewtonMethod.h.
Vector<double> Purple::NewtonMethod::evaluationHistory [private] |
Evaluation of objective function optimization history.
Definition at line 54 of file NewtonMethod.h.
Vector<double> Purple::NewtonMethod::gradientNormHistory [private] |
Gradient norm of objective function optimization history.
Definition at line 58 of file NewtonMethod.h.