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); } } }
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]); }
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]); }