RosenbrockFunction Class Reference

The Rosenbrock function, defined by: More...

Public Member Functions

 RosenbrockFunction ()
 Initialize the RosenbrockFunction. More...

 
double Evaluate (const arma::mat &coordinates, const size_t begin, const size_t batchSize) const
 
double Evaluate (const arma::mat &coordinates) const
 
arma::mat GetInitialPoint () const
 Get the starting point. More...

 
void Gradient (const arma::mat &coordinates, const size_t begin, arma::mat &gradient, const size_t batchSize) const
 
void Gradient (const arma::mat &coordinates, arma::mat &gradient) const
 
size_t NumFunctions () const
 Return 1 (the number of functions). More...

 
void Shuffle ()
 Shuffle the order of function visitation. More...

 

Detailed Description

The Rosenbrock function, defined by:

f(x) = f1(x) + f2(x) f1(x) = 100 (x2 - x1^2)^2 f2(x) = (1 - x1)^2 x_0 = [-1.2, 1]

This should optimize to f(x) = 0, at x = [1, 1].

For more information, please refer to:

@article{Rosenbrock1960,
title = {An Automatic Method for Finding the Greatest or Least Value of a
Function},
author = {Rosenbrock, H. H.},
journal = {The Computer Journal},
number = {3},
pages = {175--184},
year = {1960},
}

Definition at line 46 of file rosenbrock_function.hpp.

Constructor & Destructor Documentation

◆ RosenbrockFunction()

Member Function Documentation

◆ Evaluate() [1/2]

double Evaluate ( const arma::mat &  coordinates,
const size_t  begin,
const size_t  batchSize 
) const

◆ Evaluate() [2/2]

double Evaluate ( const arma::mat &  coordinates) const

◆ GetInitialPoint()

arma::mat GetInitialPoint ( ) const
inline

Get the starting point.

Definition at line 62 of file rosenbrock_function.hpp.

References RosenbrockFunction::Evaluate(), and RosenbrockFunction::Gradient().

◆ Gradient() [1/2]

void Gradient ( const arma::mat &  coordinates,
const size_t  begin,
arma::mat &  gradient,
const size_t  batchSize 
) const

◆ Gradient() [2/2]

void Gradient ( const arma::mat &  coordinates,
arma::mat &  gradient 
) const

◆ NumFunctions()

size_t NumFunctions ( ) const
inline

Return 1 (the number of functions).

Definition at line 59 of file rosenbrock_function.hpp.

◆ Shuffle()

void Shuffle ( )

Shuffle the order of function visitation.

This may be called by the optimizer.


The documentation for this class was generated from the following file: