php-ml/src/Phpml/Exception/MatrixException.php

24 lines
484 B
PHP
Raw Normal View History

<?php
2016-11-20 21:53:17 +00:00
declare(strict_types=1);
namespace Phpml\Exception;
class MatrixException extends \Exception
{
public static function notSquareMatrix() : MatrixException
{
return new self('Matrix is not square matrix');
}
public static function columnOutOfRange() : MatrixException
{
return new self('Column out of range');
}
public static function singularMatrix() : MatrixException
{
2017-02-23 19:59:30 +00:00
return new self('Matrix is singular');
}
}