mirror of
				https://github.com/furyfire/trueskill.git
				synced 2025-11-04 10:12:28 +01:00 
			
		
		
		
	This commit is contained in:
		@@ -8,6 +8,7 @@ use DNW\Skills\Numerics\IdentityMatrix;
 | 
			
		||||
use DNW\Skills\Numerics\Matrix;
 | 
			
		||||
use DNW\Skills\Numerics\SquareMatrix;
 | 
			
		||||
use DNW\Skills\Numerics\DiagonalMatrix;
 | 
			
		||||
use DNW\Skills\Numerics\Vector;
 | 
			
		||||
use PHPUnit\Framework\TestCase;
 | 
			
		||||
use PHPUnit\Framework\Attributes\CoversClass;
 | 
			
		||||
use PHPUnit\Framework\Attributes\UsesClass;
 | 
			
		||||
@@ -17,6 +18,7 @@ use Exception;
 | 
			
		||||
#[CoversClass(SquareMatrix::class)]
 | 
			
		||||
#[CoversClass(IdentityMatrix::class)]
 | 
			
		||||
#[CoversClass(DiagonalMatrix::class)]
 | 
			
		||||
#[CoversClass(Vector::class)]
 | 
			
		||||
// phpcs:disable PSR2.Methods.FunctionCallSignature,Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma
 | 
			
		||||
class MatrixTest extends TestCase
 | 
			
		||||
{
 | 
			
		||||
@@ -264,6 +266,15 @@ class MatrixTest extends TestCase
 | 
			
		||||
        $m2 = new Matrix(1, 1, [[1,1]]);
 | 
			
		||||
        Matrix::multiply($m1, $m2);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function testVector(): void
 | 
			
		||||
    {
 | 
			
		||||
        $vector = new Vector([1,2,3,4]);
 | 
			
		||||
 | 
			
		||||
        $m1 = new Matrix(4, 1, [[1],[2],[3],[4]]);
 | 
			
		||||
 | 
			
		||||
        $this->assertTrue($vector->equals($m1));
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// phpcs:enable
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user