---
name: "mlpack_amf_SimpleToleranceTermination"
section: "3"
platform: "linux"
package: "mlpack-doc"
version: "1.0.10-1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/mlpack_amf_SimpleToleranceTermination"
---

# mlpack\_amf\_SimpleToleranceTermination(3)

## NAME

mlpack::amf::SimpleToleranceTermination\< MatType \> -

## SYNOPSIS

### Public Member Functions

**SimpleToleranceTermination** (const double **tolerance**=1e-5, const size\_t maxIterations=10000, const size\_t reverseStepTolerance=3)\
 const double & **Index** ()\
 void **Initialize** (const MatType &**V**)\
 bool **IsConverged** (arma::mat &**W**, arma::mat &**H**)\
 const size\_t & **Iteration** ()\
 const size\_t & **MaxIterations** ()\

### Private Attributes

double **c\_index**\
 double **c\_indexOld**\
 arma::mat **H**\
 bool **isCopy**\
 size\_t **iteration**\
 size\_t **maxIterations**\
 double **normOld**\
 double **residue**\
 double **residueOld**\
 size\_t **reverseStepCount**\
 size\_t **reverseStepTolerance**\
 double **tolerance**\
 const MatType \* **V**\
 arma::mat **W**\

## Detailed Description

### template\<class MatType\>class mlpack::amf::SimpleToleranceTermination\< MatType \>

Definition at line 29 of file simple\_tolerance\_termination.hpp.

## Constructor & Destructor Documentation

### template\<class MatType \> mlpack::amf::SimpleToleranceTermination\< MatType \>::SimpleToleranceTermination (const doubletolerance = `1e-5`, const size\_tmaxIterations = `10000`, const size\_treverseStepTolerance = `3`)` [inline]`

Definition at line 32 of file simple\_tolerance\_termination.hpp.

## Member Function Documentation

### template\<class MatType \> const double& mlpack::amf::SimpleToleranceTermination\< MatType \>::Index ()` [inline]`

Definition at line 119 of file simple\_tolerance\_termination.hpp.

References mlpack::amf::SimpleToleranceTermination\< MatType \>::residue.

### template\<class MatType \> void mlpack::amf::SimpleToleranceTermination\< MatType \>::Initialize (const MatType &V)` [inline]`

Definition at line 39 of file simple\_tolerance\_termination.hpp.

References mlpack::amf::SimpleToleranceTermination\< MatType \>::c\_index, mlpack::amf::SimpleToleranceTermination\< MatType \>::c\_indexOld, mlpack::amf::SimpleToleranceTermination\< MatType \>::iteration, mlpack::amf::SimpleToleranceTermination\< MatType \>::residue, mlpack::amf::SimpleToleranceTermination\< MatType \>::residueOld, mlpack::amf::SimpleToleranceTermination\< MatType \>::reverseStepCount, and mlpack::amf::SimpleToleranceTermination\< MatType \>::V.

### template\<class MatType \> bool mlpack::amf::SimpleToleranceTermination\< MatType \>::IsConverged (arma::mat &W, arma::mat &H)` [inline]`

Definition at line 54 of file simple\_tolerance\_termination.hpp.

References mlpack::amf::SimpleToleranceTermination\< MatType \>::c\_index, mlpack::amf::SimpleToleranceTermination\< MatType \>::c\_indexOld, mlpack::amf::SimpleToleranceTermination\< MatType \>::H, mlpack::amf::SimpleToleranceTermination\< MatType \>::isCopy, mlpack::amf::SimpleToleranceTermination\< MatType \>::iteration, mlpack::amf::SimpleToleranceTermination\< MatType \>::maxIterations, mlpack::amf::SimpleToleranceTermination\< MatType \>::residue, mlpack::amf::SimpleToleranceTermination\< MatType \>::residueOld, mlpack::amf::SimpleToleranceTermination\< MatType \>::reverseStepCount, mlpack::amf::SimpleToleranceTermination\< MatType \>::reverseStepTolerance, mlpack::amf::SimpleToleranceTermination\< MatType \>::V, and mlpack::amf::SimpleToleranceTermination\< MatType \>::W.

### template\<class MatType \> const size\_t& mlpack::amf::SimpleToleranceTermination\< MatType \>::Iteration ()` [inline]`

Definition at line 120 of file simple\_tolerance\_termination.hpp.

References mlpack::amf::SimpleToleranceTermination\< MatType \>::iteration.

### template\<class MatType \> const size\_t& mlpack::amf::SimpleToleranceTermination\< MatType \>::MaxIterations ()` [inline]`

Definition at line 121 of file simple\_tolerance\_termination.hpp.

References mlpack::amf::SimpleToleranceTermination\< MatType \>::maxIterations.

## Member Data Documentation

### template\<class MatType \> double mlpack::amf::SimpleToleranceTermination\< MatType \>::c\_index` [private]`

Definition at line 141 of file simple\_tolerance\_termination.hpp.

Referenced by mlpack::amf::SimpleToleranceTermination\< MatType \>::Initialize(), and mlpack::amf::SimpleToleranceTermination\< MatType \>::IsConverged().

### template\<class MatType \> double mlpack::amf::SimpleToleranceTermination\< MatType \>::c\_indexOld` [private]`

Definition at line 140 of file simple\_tolerance\_termination.hpp.

Referenced by mlpack::amf::SimpleToleranceTermination\< MatType \>::Initialize(), and mlpack::amf::SimpleToleranceTermination\< MatType \>::IsConverged().

### template\<class MatType \> arma::mat mlpack::amf::SimpleToleranceTermination\< MatType \>::H` [private]`

Definition at line 139 of file simple\_tolerance\_termination.hpp.

Referenced by mlpack::amf::SimpleToleranceTermination\< MatType \>::IsConverged().

### template\<class MatType \> bool mlpack::amf::SimpleToleranceTermination\< MatType \>::isCopy` [private]`

Definition at line 137 of file simple\_tolerance\_termination.hpp.

Referenced by mlpack::amf::SimpleToleranceTermination\< MatType \>::IsConverged().

### template\<class MatType \> size\_t mlpack::amf::SimpleToleranceTermination\< MatType \>::iteration` [private]`

Definition at line 129 of file simple\_tolerance\_termination.hpp.

Referenced by mlpack::amf::SimpleToleranceTermination\< MatType \>::Initialize(), mlpack::amf::SimpleToleranceTermination\< MatType \>::IsConverged(), and mlpack::amf::SimpleToleranceTermination\< MatType \>::Iteration().

### template\<class MatType \> size\_t mlpack::amf::SimpleToleranceTermination\< MatType \>::maxIterations` [private]`

Definition at line 125 of file simple\_tolerance\_termination.hpp.

Referenced by mlpack::amf::SimpleToleranceTermination\< MatType \>::IsConverged(), and mlpack::amf::SimpleToleranceTermination\< MatType \>::MaxIterations().

### template\<class MatType \> double mlpack::amf::SimpleToleranceTermination\< MatType \>::normOld` [private]`

Definition at line 132 of file simple\_tolerance\_termination.hpp.

### template\<class MatType \> double mlpack::amf::SimpleToleranceTermination\< MatType \>::residue` [private]`

Definition at line 131 of file simple\_tolerance\_termination.hpp.

Referenced by mlpack::amf::SimpleToleranceTermination\< MatType \>::Index(), mlpack::amf::SimpleToleranceTermination\< MatType \>::Initialize(), and mlpack::amf::SimpleToleranceTermination\< MatType \>::IsConverged().

### template\<class MatType \> double mlpack::amf::SimpleToleranceTermination\< MatType \>::residueOld` [private]`

Definition at line 130 of file simple\_tolerance\_termination.hpp.

Referenced by mlpack::amf::SimpleToleranceTermination\< MatType \>::Initialize(), and mlpack::amf::SimpleToleranceTermination\< MatType \>::IsConverged().

### template\<class MatType \> size\_t mlpack::amf::SimpleToleranceTermination\< MatType \>::reverseStepCount` [private]`

Definition at line 135 of file simple\_tolerance\_termination.hpp.

Referenced by mlpack::amf::SimpleToleranceTermination\< MatType \>::Initialize(), and mlpack::amf::SimpleToleranceTermination\< MatType \>::IsConverged().

### template\<class MatType \> size\_t mlpack::amf::SimpleToleranceTermination\< MatType \>::reverseStepTolerance` [private]`

Definition at line 134 of file simple\_tolerance\_termination.hpp.

Referenced by mlpack::amf::SimpleToleranceTermination\< MatType \>::IsConverged().

### template\<class MatType \> double mlpack::amf::SimpleToleranceTermination\< MatType \>::tolerance` [private]`

Definition at line 124 of file simple\_tolerance\_termination.hpp.

### template\<class MatType \> const MatType\* mlpack::amf::SimpleToleranceTermination\< MatType \>::V` [private]`

Definition at line 127 of file simple\_tolerance\_termination.hpp.

Referenced by mlpack::amf::SimpleToleranceTermination\< MatType \>::Initialize(), and mlpack::amf::SimpleToleranceTermination\< MatType \>::IsConverged().

### template\<class MatType \> arma::mat mlpack::amf::SimpleToleranceTermination\< MatType \>::W` [private]`

Definition at line 138 of file simple\_tolerance\_termination.hpp.

Referenced by mlpack::amf::SimpleToleranceTermination\< MatType \>::IsConverged().

## Author

Generated automatically by Doxygen for MLPACK from the source code.
