SparseTestFunction Class Reference

Public Member Functions

 SparseTestFunction ()
 Set members in the default constructor. More...

 
double Evaluate (const arma::mat &coordinates, const size_t i, const size_t batchSize=1) const
 Evaluate a function. More...

 
double Evaluate (const arma::mat &coordinates) const
 Evaluate all the functions. More...

 
arma::mat GetInitialPoint () const
 Get the starting point. More...

 
void Gradient (const arma::mat &coordinates, const size_t i, arma::sp_mat &gradient, const size_t batchSize=1) const
 Evaluate the gradient of a function. More...

 
size_t NumFeatures () const
 Return 4 (the number of features). More...

 
size_t NumFunctions () const
 Return 4 (the number of functions). More...

 
void PartialGradient (const arma::mat &coordinates, const size_t j, arma::sp_mat &gradient) const
 Evaluate the gradient of a feature function. More...

 

Detailed Description

Definition at line 26 of file sparse_test_function.hpp.

Constructor & Destructor Documentation

◆ SparseTestFunction()

SparseTestFunction ( )
inline

Set members in the default constructor.

Definition at line 30 of file sparse_test_function.hpp.

Member Function Documentation

◆ Evaluate() [1/2]

double Evaluate ( const arma::mat &  coordinates,
const size_t  i,
const size_t  batchSize = 1 
) const
inline

Evaluate a function.

Definition at line 46 of file sparse_test_function.hpp.

◆ Evaluate() [2/2]

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

Evaluate all the functions.

Definition at line 61 of file sparse_test_function.hpp.

References SparseTestFunction::NumFunctions().

◆ GetInitialPoint()

arma::mat GetInitialPoint ( ) const
inline

Get the starting point.

Definition at line 43 of file sparse_test_function.hpp.

◆ Gradient()

void Gradient ( const arma::mat &  coordinates,
const size_t  i,
arma::sp_mat &  gradient,
const size_t  batchSize = 1 
) const
inline

Evaluate the gradient of a function.

Definition at line 74 of file sparse_test_function.hpp.

◆ NumFeatures()

size_t NumFeatures ( ) const
inline

Return 4 (the number of features).

Definition at line 40 of file sparse_test_function.hpp.

◆ NumFunctions()

size_t NumFunctions ( ) const
inline

Return 4 (the number of functions).

Definition at line 37 of file sparse_test_function.hpp.

Referenced by SparseTestFunction::Evaluate().

◆ PartialGradient()

void PartialGradient ( const arma::mat &  coordinates,
const size_t  j,
arma::sp_mat &  gradient 
) const
inline

Evaluate the gradient of a feature function.

Definition at line 85 of file sparse_test_function.hpp.


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