public void SetSubmatrixException4() { MatrixD m = new MatrixD(4, 3, rowMajor, MatrixOrder.RowMajor); m.SetSubmatrix(1, 4, new MatrixD(1, 1)); }
public void SetSubmatrixException7() { MatrixD m = new MatrixD(4, 3, rowMajor, MatrixOrder.RowMajor); m.SetSubmatrix(1, 1, null); }
public void SetSubmatrix() { MatrixD m = new MatrixD(4, 5, 0); m.SetSubmatrix(2, 2, new MatrixD(new double[,] { { 1, 2, 3 }, { 4, 5, 6 } })); Assert.AreEqual(new MatrixD(new double[,] {{0, 0, 0, 0, 0}, {0, 0, 0, 0, 0}, {0, 0, 1, 2, 3}, {0, 0, 4, 5, 6}}), m); m.SetSubmatrix(0, 0, new MatrixD(1, 1, 777)); Assert.AreEqual(777, m[0, 0]); }