Beispiel #1
0
    public void ToArrayJagged()
    {
      Matrix33D m = new Matrix33D(1, 2, 3, 4, 5, 6, 7, 8, 9);

      double[][] array = m.ToArrayJagged();
      for (int i = 0; i < 3; i++)
        for (int j = 0; j < 3; j++)
          Assert.AreEqual(i * 3 + j + 1, array[i][j]);

      array = (double[][])m;
      for (int i = 0; i < 3; i++)
        for (int j = 0; j < 3; j++)
          Assert.AreEqual(i * 3 + j + 1, array[i][j]);
    }
Beispiel #2
0
        public void ToArrayJagged()
        {
            Matrix33D m = new Matrix33D(1, 2, 3, 4, 5, 6, 7, 8, 9);

              double[][] array = m.ToArrayJagged();
              for (int i = 0; i < 3; i++)
            for (int j = 0; j < 3; j++)
              Assert.AreEqual(i * 3 + j + 1, array[i][j]);

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