Example #1
0
 public void ToMatrix33DException2()
 {
     MatrixD m = new MatrixD(4, 3);
       Matrix33D m33 = m.ToMatrix33D();
 }
Example #2
0
 public void ToMatrix33DException3()
 {
     MatrixD m = new MatrixD(3, 4);
       Matrix33D m33 = m.ToMatrix33D();
 }
Example #3
0
        public void ToMatrix33D()
        {
            double[] values = new double[] { 1.0, 2.0, 3.0,
                                     4.0, 5.0, 6.0,
                                     7.0, 8.0, 9.0 };
              MatrixD m = new MatrixD(3, 3, values, MatrixOrder.RowMajor);

              Matrix33D m33 = m.ToMatrix33D();
              for (int i = 0; i < 3; i++)
            for (int j = 0; j < 3; j++)
              Assert.AreEqual(i * 3 + j + 1, m33[i, j]);

              m33 = (Matrix33D) m;
              for (int i = 0; i < 3; i++)
            for (int j = 0; j < 3; j++)
              Assert.AreEqual(i * 3 + j + 1, m33[i, j]);
        }