Пример #1
0
        public void TestClear()
        {
            ObjectMatrix <int> m = GetTestMatrix();

            m.Clear();

            for (int i = 0; i < m.Rows; i++)
            {
                for (int j = 0; j < m.Columns; j++)
                {
                    Assert.AreEqual(m[i, j], 0);
                }
            }
        }
Пример #2
0
        public void ClearExample()
        {
            var matrix = new ObjectMatrix <double>(4, 5);

            // Set the item
            matrix[2, 3] = 5;

            // Item is 5
            Assert.AreEqual(5, matrix[2, 3]);

            // Clear the matrix
            matrix.Clear();

            // Item is now 0
            Assert.AreEqual(0, matrix[2, 3]);
        }
Пример #3
0
        public void ClearExample()
        {
            var matrix = new ObjectMatrix<double>(4, 5);

            // Set the item
            matrix[2, 3] = 5;

            // Item is 5
            Assert.AreEqual(5, matrix[2, 3]);

            // Clear the matrix
            matrix.Clear();

            // Item is now 0
            Assert.AreEqual(0, matrix[2, 3]);
        }