Пример #1
0
        public void HelpMethodsTestRand()
        {
            int i = rand.Next() % (int)Math.Sqrt(Int32.MaxValue);
            int j = rand.Next() % (i + 1);

            Assert.AreEqual((i, j), Beap <int> .Index2RowCol(Beap <int> .RowCol2Index(i, j)));

            int k = rand.Next();

            Assert.AreEqual(k, Beap <int> .RowCol2Index(Beap <int> .Index2RowCol(k).Item1, Beap <int> .Index2RowCol(k).Item2));
        }
Пример #2
0
 public void HelpMethodsTest2()
 {
     Assert.AreEqual(4, Beap <int> .RowCol2Index(2, 1));
     Assert.AreEqual((2, 1), Beap <int> .Index2RowCol(4));
 }
Пример #3
0
 public void HelpMethodsTest3()
 {
     Assert.AreEqual(3, Beap <int> .RowCol2Index(2, 0));
     Assert.AreEqual((2, 0), Beap <int> .Index2RowCol(3));
 }
Пример #4
0
 public void HelpMethodsTest1()
 {
     Assert.AreEqual(5, Beap <int> .RowCol2Index(2, 2));
     Assert.AreEqual((2, 2), Beap <int> .Index2RowCol(5));
 }