示例#1
0
 public SV(SV enter)
 {
     intensity = enter.intensity;
     time      = enter.time;
     count     = enter.count;
     array_yi  = new Y[count];
     IsSorted  = enter.IsSorted;
     for (int i = 0; i < count; i++)
     {
         array_yi[i].pi       = enter.array_yi[i].pi;
         array_yi[i].Nu       = enter.array_yi[i].Nu;
         array_yi[i].size     = enter.array_yi[i].size;
         array_yi[i].number   = enter.array_yi[i].number;
         array_yi[i].original = enter.array_yi[i].original;
     }
 }
示例#2
0
        private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
        {
            exper.finalize();
            exper = new SV();
            exper.Set(Convert.ToDouble(INTENSITY.Text), Convert.ToDouble(TIME.Text), Convert.ToInt32(SIZE_EXP.Text));
            Stopwatch timer = new Stopwatch();

            timer.Start();
            //exper.Generate(); // Single generate
            exper.GenerateParallel(); // Parallel generate
            exper.FilterOriginal();
            exper.FindValueSettings();

            timer.Stop();

            TIME_ELAPSED.Text = (timer.ElapsedMilliseconds / 1000.0).ToString() + " сек";
        }