X7ROOT File Manager
Current Path:
/home/cbholdings/pasukulu/lib/mlbackend/php/phpml/src/Phpml/Math
home
/
cbholdings
/
pasukulu
/
lib
/
mlbackend
/
php
/
phpml
/
src
/
Phpml
/
Math
/
📁
..
📄
Comparison.php
(971 B)
📁
Distance
📄
Distance.php
(136 B)
📁
Kernel
📄
Kernel.php
(222 B)
📁
LinearAlgebra
📄
Matrix.php
(7.82 KB)
📄
Product.php
(421 B)
📄
Set.php
(3.68 KB)
📁
Statistic
Editing: Comparison.php
<?php declare(strict_types=1); namespace Phpml\Math; use Phpml\Exception\InvalidArgumentException; class Comparison { /** * @param mixed $a * @param mixed $b * * @throws InvalidArgumentException */ public static function compare($a, $b, string $operator): bool { switch ($operator) { case '>': return $a > $b; case '>=': return $a >= $b; case '=': case '==': return $a == $b; case '===': return $a === $b; case '<=': return $a <= $b; case '<': return $a < $b; case '!=': case '<>': return $a != $b; case '!==': return $a !== $b; default: throw new InvalidArgumentException(sprintf('Invalid operator "%s" provided', $operator)); } } }
Upload File
Create Folder