mlpack  3.0.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
AddDecomposableGradientConst< FunctionType, true, false > Class Template Reference

If we have a decomposable const EvaluateWithGradient() but not a decomposable const Gradient(), add a decomposable const Gradient() method. More...

Public Member Functions

void Gradient (const arma::mat &coordinates, const size_t begin, arma::mat &gradient, const size_t batchSize) const
 Calculate the gradient and store it in the given matrix, starting at the given decomposable function index and using the given batch size. More...
 

Detailed Description

template<typename FunctionType>
class mlpack::optimization::AddDecomposableGradientConst< FunctionType, true, false >

If we have a decomposable const EvaluateWithGradient() but not a decomposable const Gradient(), add a decomposable const Gradient() method.

Definition at line 132 of file add_decomposable_gradient.hpp.

Member Function Documentation

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

Calculate the gradient and store it in the given matrix, starting at the given decomposable function index and using the given batch size.

Parameters
coordinatesCoordinates to evaluate the function at.
beginIndex of decomposable function to start at.
gradientMatrix to store the gradient into.
batchSizeNumber of decomposable functions to calculate for.

Definition at line 144 of file add_decomposable_gradient.hpp.

References AddDecomposableEvaluateWithGradientStatic< FunctionType, HasDecomposableEvaluateGradient, HasDecomposableEvaluateWithGradient >::EvaluateWithGradient().


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