# MathUtils Class Reference
[Mathematical utilities]

Inheritance diagram for MathUtils:
[legend]

List of all members.

## Static Public Member Functions

static | fisherYatesShuffle (&$elts)
| Fisher Yates shuffle algorithm implementation.
static | makeCartesianProduct ($arrays, $generateHash=false)
static | applyFunctorToCartesianProduct ($arrays, TupleFunctor $functor)
static | randFloat ($min, $max)
static | alignByBase ($value, $base, $ceil=false)
static | randomNormalStd ()
| G.
static | getStandardDeviation (array $list)
static | getStandardDeviationP (array $list, $size=null)
static | getAbsoluteDeviation (array $list)
static | getMeanDeviation ($elt, $averageValue)
static | getAverage (array $list, $size=null)
static | getCovariance (array $list1, array $list2)
static | getPearsonProductMomentCorrelation (array $list1, array $list2)
static | getMmult (array $list1, array $list2)

## Detailed Description

Definition at line 15 of file MathUtils.class.php.

## Member Function Documentation

static MathUtils::alignByBase | ( | $ | value,
|  | $ | base,
|  | $ | ceil = `false` |
| ) |  |  | `[static]`

Definition at line 111 of file MathUtils.class.php.

Referenced by GoogleChartDataSet::calculateMax().

static MathUtils::applyFunctorToCartesianProduct | ( | $ | arrays,
|  | TupleFunctor $ | functor |
| ) |  |  | `[static]`

Definition at line 70 of file MathUtils.class.php.

References TupleFunctor::apply().

Here is the call graph for this function:

static MathUtils::fisherYatesShuffle | ( | &$ | elts | ) | `[static]`

Fisher Yates shuffle algorithm implementation.

Definition at line 20 of file MathUtils.class.php.

static MathUtils::getAbsoluteDeviation | ( | array $ | list | ) | `[static]`

Definition at line 160 of file MathUtils.class.php.

References getAverage().

Here is the call graph for this function:

static MathUtils::getAverage | ( | array $ | list,
|  | $ | size = `null` |
| ) |  |  | `[static]`

Definition at line 177 of file MathUtils.class.php.

References Assert::isPositiveInteger().

Referenced by getAbsoluteDeviation(), getCovariance(), and getStandardDeviationP().

Here is the call graph for this function:

static MathUtils::getCovariance | ( | array $ | list1,
|  | array $ | list2 |
| ) |  |  | `[static]`

Definition at line 192 of file MathUtils.class.php.

References getAverage(), getMeanDeviation(), and Assert::isEqual().

Referenced by getPearsonProductMomentCorrelation().

Here is the call graph for this function:

static MathUtils::getMeanDeviation | ( | $ | elt,
|  | $ | averageValue |
| ) |  |  | `[static]`

Definition at line 172 of file MathUtils.class.php.

Referenced by getCovariance().

static MathUtils::getMmult | ( | array $ | list1,
|  | array $ | list2 |
| ) |  |  | `[static]`

Definition at line 224 of file MathUtils.class.php.

static MathUtils::getPearsonProductMomentCorrelation | ( | array $ | list1,
|  | array $ | list2 |
| ) |  |  | `[static]`

Definition at line 214 of file MathUtils.class.php.

References getCovariance(), and getStandardDeviation().

Here is the call graph for this function:

static MathUtils::getStandardDeviation | ( | array $ | list | ) | `[static]`

Definition at line 138 of file MathUtils.class.php.

References getStandardDeviationP().

Referenced by getPearsonProductMomentCorrelation().

Here is the call graph for this function:

static MathUtils::getStandardDeviationP | ( | array $ | list,
|  | $ | size = `null` |
| ) |  |  | `[static]`

Definition at line 143 of file MathUtils.class.php.

References getAverage(), and Assert::isPositiveInteger().

Referenced by getStandardDeviation().

Here is the call graph for this function:

static MathUtils::makeCartesianProduct | ( | $ | arrays,
|  | $ | generateHash = `false` |
| ) |  |  | `[static]`

Definition at line 33 of file MathUtils.class.php.

static MathUtils::randFloat | ( | $ | min,
|  | $ | max |
| ) |  |  | `[static]`

Definition at line 106 of file MathUtils.class.php.

static MathUtils::randomNormalStd | ( |  | ) | `[static]`

G.

E. P. Box and Mervin E. Muller, A Note on the Generation of Random Normal Deviates, The Annals of Mathematical Statistics (1958), Vol. 29, No. 2 pp. 610-611

Definition at line 123 of file MathUtils.class.php.

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

- main/Math/MathUtils.class.php