コード例 #1
0
        public void Test8()
        {
            TestClassMinElemUp obj = new TestClassMinElemUp();

            int[][] array = new int[][] { null, new[] { 100, -3 }, new[] { 2, -1000, 4 }, null };
            MatrixFunc.BubbleSort(obj, array);
            Assert.AreEqual(new int[][] { null, null, new[] { 100, -3 }, new[] { 2, -1000, 4 } }, array);
        }
コード例 #2
0
        public void Test7()
        {
            TestClassMinElemDown obj = new TestClassMinElemDown();

            int[][] array = new int[][] { null, new[] { -1001, 2, 3, 4 }, new[] { 2, 3, -4 }, null, null, new[] { 4, 5, 6, 7, 432, 4 }, new[] { 5, 5, 55555 }, null, null };
            MatrixFunc.BubbleSort(obj, array);
            Assert.AreEqual(new int[][] { null, null, null, null, null, new[] { -1001, 2, 3, 4 }, new[] { 2, 3, -4 }, new[] { 4, 5, 6, 7, 432, 4 }, new[] { 5, 5, 55555 } }, array);
        }
コード例 #3
0
        public void Test5()
        {
            TestClassMaxElemUp obj = new TestClassMaxElemUp();

            int[][] array = new int[][] { null, new[] { 1, 2, 3, 4 }, new[] { 2, 3, 4 }, null, null, new[] { 4, 5, 6, 7, 432, 4 }, new[] { 5, 5, 55555 }, null, null, new[] { 0, 5, 6, 7, 0, 4 } };
            MatrixFunc.BubbleSort(obj, array);
            Assert.AreEqual(new int[][] { null, null, null, null, null, new[] { 1, 2, 3, 4 }, new[] { 2, 3, 4 }, new[] { 0, 5, 6, 7, 0, 4 }, new[] { 4, 5, 6, 7, 432, 4 }, new[] { 5, 5, 55555 } }, array);
        }
コード例 #4
0
        public void Test3()
        {
            TestClassSumDown obj = new TestClassSumDown();

            int[][] array = new int[][] { new[] { 1, 2, 3, 4 }, new[] { 2, 3, 4 }, null, new[] { 5, 5, 55555 }, new[] { 0, 5, 6, 7, 0, 4 }, null };
            MatrixFunc.BubbleSort(obj, array);
            Assert.AreEqual(new int[][] { null, null, new[] { 5, 5, 55555 }, new[] { 0, 5, 6, 7, 0, 4 }, new[] { 1, 2, 3, 4 }, new[] { 2, 3, 4 } }, array);
        }
コード例 #5
0
ファイル: MatrixUtil.cs プロジェクト: jos139/maze
 public static void UniFuncArangeAll(MatrixUtil matrix, MatrixFunc func)
 {
     for (int i = 0; i < matrix.shape[0]; i++)
     {
         for (int j = 0; j < matrix.shape[1]; j++)
         {
             matrix.Set(i, j, func());
         }
     }
 }
コード例 #6
0
 private void стандартныйRandomToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         rngseq = MatrixFunc.GetRndInt(rndcount, 0, range);
         curRng = "DefaultRng";
         Save_Vec(rngseq, curRng);
         label1.Text = "Выборки сгенерированны.";
     }
     catch (Exception ex)
     {
         label1.Text = ex.Message;
     }
 }
コード例 #7
0
 //Задать разммерность базиса
 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     MatrixFunc.SetMatrix(Convert.ToInt32(comboBox1.SelectedItem));
     count = Convert.ToInt32(comboBox1.SelectedItem);
 }