Пример #1
0
        private void UpdateTimeline(object sender, PSOProgressEventArgs progress)
        {
            if (progress.ExecutionID != executionID)
            {
                combined          = new IterationSnapshot[progress.OptionsPSO.iterCount];
                executionID       = progress.ExecutionID;
                lastProcessedIter = -1;
            }

            timeline    = progress;
            executionID = progress.ExecutionID;

            var currIter = progress.CurrentIter;

            if (currIter > lastProcessedIter)
            {
                Combine(progress, currIter);
            }
            ;

            lastProcessedIter = currIter;
            isRunning         = lastProcessedIter < progress.OptionsPSO.iterCount - 1;
            PSOTimelineChanged?.Invoke(this, isRunning);
        }
Пример #2
0
        private void Combine(PSOProgressEventArgs progress, int iIter)
        {
            var snapshotsAcrossRun = MGHelper.GetCol(progress.Snapshots, iIter);

            combined[iIter] = IterationSnapshot.Combine(snapshotsAcrossRun);
        }