mlpack  git-master
AddDecomposableGradient< FunctionType, true, false > Class Template Reference

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

Public Member Functions

void Gradient (const arma::mat &coordinates, const size_t begin, arma::mat &gradient, const size_t batchSize)
 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::AddDecomposableGradient< FunctionType, true, false >

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

Definition at line 65 of file add_decomposable_gradient.hpp.

Member Function Documentation

◆ Gradient()

void Gradient ( const arma::mat &  coordinates,
const size_t  begin,
arma::mat &  gradient,
const size_t  batchSize 
)
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 77 of file add_decomposable_gradient.hpp.

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


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