Ejemplo n.º 1
0
        public void ConstructorsTest()
        {
            testMatrix = new DiagonalMatrix <float>(2);
            CollectionAssert.AreEqual(new float[4] {
                0, 0, 0, 0
            }, testMatrix.GetElements());

            testMatrix = new DiagonalMatrix <float>(3, 5);
            CollectionAssert.AreEqual(new float[9] {
                5, 0, 0, 0, 5, 0, 0, 0, 5
            }, testMatrix.GetElements());

            testMatrix = new DiagonalMatrix <float>(1, 2, 3);
            CollectionAssert.AreEqual(new float[9] {
                1, 0, 0, 0, 2, 0, 0, 0, 3
            }, testMatrix.GetElements());
        }