MCordingley\LinearAlgebraTest\MatrixTest::testSpliceRows PHP Метод

testSpliceRows() публичный Метод

public testSpliceRows ( )
    public function testSpliceRows()
    {
        $matrix = new Matrix([[1, -1, 2], [4, 0, 6], [0, 1, -1]]);
        $spliced = $matrix->spliceRows(1, 1, [[8, 5, 2]]);
        static::assertEquals(1, $spliced->get(0, 0));
        static::assertEquals(-1, $spliced->get(0, 1));
        static::assertEquals(2, $spliced->get(0, 2));
        static::assertEquals(8, $spliced->get(1, 0));
        static::assertEquals(5, $spliced->get(1, 1));
        static::assertEquals(2, $spliced->get(1, 2));
        static::assertEquals(0, $spliced->get(2, 0));
        static::assertEquals(1, $spliced->get(2, 1));
        static::assertEquals(-1, $spliced->get(2, 2));
    }