public void ArrayOfArrayMatrixConstructorTest()
 {
     double[][] value = new double[2][];
     value[0] = new double[] { 1, 2, 3 };
     value[1] = new double[] { 4, 5, 6 };
     ArrayOfArrayMatrix target = new ArrayOfArrayMatrix(value);
 }
Exemplo n.º 2
0
        public void AreEqualTest()
        {
            Matrix a = new SingleArrayMatrix(new double[] { 1, 2, 3, 4, 5, 6, 7, 8 }, 4);
            Matrix b = new MultidimensionalArrayMatrix(new double[, ] {
                { 1, 2, 3, 4 }, { 5, 6, 7, 8 }
            });

            double[][] pom = new double[2][];
            pom[0] = new double[] { 1, 2, 3, 4 };
            pom[1] = new double[] { 5, 6, 7, 8 };
            Matrix c = new ArrayOfArrayMatrix(pom);

            bool actual;

            actual = Matrix.AreEqual(a, b);
            Assert.IsTrue(actual, "Matrices A and B are different.");
            actual = Matrix.AreEqual(a, c);
            Assert.IsTrue(actual, "Matrice A and C are different.");
            actual = Matrix.AreEqual(b, c);
            Assert.IsTrue(actual, "Matrice B and C are different.");
        }