public void ContainsExample()
        {
            var matrix = new ObjectMatrix <double>(2, 2);

            matrix[0, 0] = -2;
            matrix[0, 1] = 3;
            matrix[1, 0] = 4;
            matrix[1, 1] = 6;

            Assert.IsTrue(matrix.Contains(-2));
            Assert.IsTrue(matrix.Contains(3));
            Assert.IsFalse(matrix.Contains(-5));
        }
        public void TestContains()
        {
            ObjectMatrix <int> m = new ObjectMatrix <int>(10, 15);

            m[5, 5] = 13;

            Assert.AreEqual(m.Contains(13), true);
            Assert.AreEqual(m.Contains(15), false);

            m[2, 3] = 15;

            Assert.AreEqual(m.Contains(13), true);
            Assert.AreEqual(m.Contains(15), true);
            Assert.AreEqual(m.Contains(17), false);
        }
Exemple #3
0
        public void Simple()
        {
            var matrix = new ObjectMatrix <int>(10, 15);

            matrix[5, 5] = 13;

            Assert.IsTrue(matrix.Contains(13));
            Assert.IsFalse(matrix.Contains(15));

            matrix[2, 3] = 15;

            Assert.IsTrue(matrix.Contains(13));
            Assert.IsTrue(matrix.Contains(15));
            Assert.IsFalse(matrix.Contains(17));
        }
Exemple #4
0
        public void Simple()
        {
            var matrix = new ObjectMatrix<int>(10, 15);

            matrix[5, 5] = 13;

            Assert.IsTrue(matrix.Contains(13));
            Assert.IsFalse(matrix.Contains(15));

            matrix[2, 3] = 15;

            Assert.IsTrue(matrix.Contains(13));
            Assert.IsTrue(matrix.Contains(15));
            Assert.IsFalse(matrix.Contains(17));
        }
        public void ContainsExample()
        {
            var matrix = new ObjectMatrix<double>(2, 2);
            matrix[0, 0] = -2;
            matrix[0, 1] = 3;
            matrix[1, 0] = 4;
            matrix[1, 1] = 6;

            Assert.IsTrue(matrix.Contains(-2));
            Assert.IsTrue(matrix.Contains(3));
            Assert.IsFalse(matrix.Contains(-5));
        }