ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
Standardize.php
Go to the documentation of this file.
1
<?
php
2
3
namespace
PhpOffice\PhpSpreadsheet\Calculation\Statistical
;
4
5
use
PhpOffice\PhpSpreadsheet\Calculation\Exception
;
6
use
PhpOffice\PhpSpreadsheet\Calculation\Functions
;
7
8
class
Standardize
extends
StatisticalValidations
9
{
21
public
static
function
execute
($value, $mean, $stdDev)
22
{
23
$value =
Functions::flattenSingleValue
($value);
24
$mean =
Functions::flattenSingleValue
($mean);
25
$stdDev =
Functions::flattenSingleValue
($stdDev);
26
27
try
{
28
$value = self::validateFloat($value);
29
$mean = self::validateFloat($mean);
30
$stdDev = self::validateFloat($stdDev);
31
}
catch
(
Exception
$e) {
32
return
$e->getMessage();
33
}
34
35
if
($stdDev <= 0) {
36
return
Functions::NAN
();
37
}
38
39
return
($value - $mean) / $stdDev;
40
}
41
}
PhpOffice\PhpSpreadsheet\Calculation\Statistical\Standardize\execute
static execute($value, $mean, $stdDev)
STANDARDIZE.
Definition:
Standardize.php:21
PhpOffice\PhpSpreadsheet\Calculation\Statistical\StatisticalValidations
Definition:
StatisticalValidations.php:8
PhpOffice\PhpSpreadsheet\Calculation\Functions\NAN
static NAN()
NaN.
Definition:
Functions.php:181
Exception
PhpOffice\PhpSpreadsheet\Calculation\Statistical
Definition:
AggregateBase.php:3
Functions
php
PhpOffice\PhpSpreadsheet\Calculation\Functions\flattenSingleValue
static flattenSingleValue($value='')
Convert an array to a single scalar value by extracting the first element.
Definition:
Functions.php:649
PhpOffice\PhpSpreadsheet\Calculation\Statistical\Standardize
Definition:
Standardize.php:8
Exception
libs
composer
vendor
phpoffice
phpspreadsheet
src
PhpSpreadsheet
Calculation
Statistical
Standardize.php
Generated on Thu Jan 30 2025 19:01:23 for ILIAS by
1.8.13 (using
Doxyfile
)