public function SingularValueDecomposition::rank in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/JAMA/SingularValueDecomposition.php \SingularValueDecomposition::rank()
* Effective numerical matrix rank * * @access public *
Return value
Number of nonnegligible singular values.
File
- vendor/
phpoffice/ phpexcel/ Classes/ PHPExcel/ Shared/ JAMA/ SingularValueDecomposition.php, line 514
Class
- SingularValueDecomposition
- @package JAMA
Code
public function rank() {
$eps = pow(2.0, -52.0);
$tol = max($this->m, $this->n) * $this->s[0] * $eps;
$r = 0;
for ($i = 0; $i < count($this->s); ++$i) {
if ($this->s[$i] > $tol) {
++$r;
}
}
return $r;
}