Example #1
0
        public void ToList()
        {
            MatrixD m = new MatrixD(3, 4, rowMajor, MatrixOrder.RowMajor);

              List<double> list = m.ToList(MatrixOrder.RowMajor);
              Assert.AreEqual(12, list.Count);
              for (int i = 0; i < 12; i++)
            Assert.AreEqual(rowMajor[i], list[i]);

              m = new MatrixD(3, 4, columnMajor, MatrixOrder.ColumnMajor);
              list = m.ToList(MatrixOrder.ColumnMajor);
              Assert.AreEqual(12, list.Count);
              for (int i = 0; i < 12; i++)
            Assert.AreEqual(columnMajor[i], list[i]);
        }