Beispiel #1
0
        public PreprocessingContext(IDataAnalysisProblemData dataAnalysisProblemData, IAlgorithm algorithm, IDataAnalysisProblem problem)
        {
            var transactionalPreprocessingData = new TransactionalPreprocessingData(dataAnalysisProblemData);

            Data = new FilteredPreprocessingData(transactionalPreprocessingData);

            ProblemData = dataAnalysisProblemData;
            Algorithm   = algorithm;
            Problem     = problem;

            creator = new ProblemDataCreator(this);
        }
Beispiel #2
0
        public void Import(IDataAnalysisProblemData problemData, IItem source = null)
        {
            if (problemData == null)
            {
                throw new ArgumentNullException("problemData");
            }
            if (source != null && ExtractProblemData(source) != problemData)
            {
                source = null; // ignore the source if the source's problem data is different
            }
            Source = source ?? problemData;
            var namedSource = Source as INamedItem;

            if (namedSource != null)
            {
                Name = "Preprocessing " + namedSource.Name;
            }
            Data = new FilteredPreprocessingData(new PreprocessingData(problemData));
            OnReset();
            // Reset GUI:
            // - OnContentChanged for PreprocessingView!
            // event? task(async import)?
        }
Beispiel #3
0
        public void Import(IDataAnalysisProblemData problemData, IItem source = null)
        {
            if (problemData == null)
            {
                throw new ArgumentNullException("problemData");
            }
            if (source != null && ExtractProblemData(source) != problemData)
            {
                throw new ArgumentException("The ProblemData extracted from the Source is different than the given ProblemData.");
            }
            Source = source ?? problemData;
            var namedSource = Source as INamedItem;

            if (namedSource != null)
            {
                Name = "Preprocessing " + namedSource.Name;
            }
            Data = new FilteredPreprocessingData(new TransactionalPreprocessingData(problemData));
            OnReset();
            // Reset GUI:
            // - OnContentChanged for PreprocessingView!
            // event? task(async import)?
        }
 private FilteredPreprocessingData(FilteredPreprocessingData original, Cloner cloner)
     : base(original, cloner)
 {
     originalData = original.originalData;
     filteredData = original.filteredData;
 }