RemoveRows() 공개 메소드

Returns a new matrix with all of the specified rows removed
public RemoveRows ( int passedIndicesOfRowsToRemove ) : Matrix
passedIndicesOfRowsToRemove int
리턴 Matrix
        public void Matrix_RemoveRowsAndColumnsTest()
        {
            Matrix testMatrix = new Matrix(3,3);
            testMatrix.InsertMatrixAt(Matrix.IdentityMatrix(2), 1, 1);

            int[] rowsToRemove = { 0 };
            int[] columnsToRemove = { 0, 1 };

            Matrix actualMatrix = testMatrix.RemoveRows(rowsToRemove);
            actualMatrix = actualMatrix.RemoveColumns(columnsToRemove);

            Matrix expectedMatrix = new Matrix(2, 1);
            expectedMatrix.SetElement(1, 0, 1.0);

            (actualMatrix == expectedMatrix).Should().BeTrue();
        }