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