Exemplo n.º 1
0
        /// <summary>
        /// List of the settings for which the comparison should be made.
        /// </summary>
        /// <returns></returns>
        public static List <Tuple <String, OverlapRemovalSettings> > CollectionOverlapRemovalMethods()
        {
            List <Tuple <String, OverlapRemovalSettings> > testList = new List <Tuple <String, OverlapRemovalSettings> >();

            //set OverlapRemovalSettings so that we can be sure that the wanted parameters are used.
            OverlapRemovalSettings settings = new OverlapRemovalSettings();

            settings.Method                    = OverlapRemovalMethod.Prism;
            settings.Epsilon                   = 1E-6;
            settings.IterationsMax             = 1000;
            settings.StopOnMaxIterat           = false;
            settings.NodeSeparation            = 4;
            settings.RandomizationSeed         = 21;
            settings.InitialScaling            = InitialScaling.None;
            settings.WorkInInches              = false;
            settings.RandomizeAllPointsOnStart = false;
            settings.RandomizationSeed         = 10;

            settings.StressSettings.MaxStressIterations        = 27;
            settings.StressSettings.SolvingMethod              = SolvingMethod.PrecondConjugateGradient;
            settings.StressSettings.UpdateMethod               = UpdateMethod.Parallel;
            settings.StressSettings.StressChangeTolerance      = 10E-4;
            settings.StressSettings.CancelOnStressConvergence  = true;
            settings.StressSettings.CancelOnStressMaxIteration = true;
            settings.StressSettings.Parallelize           = false;
            settings.StressSettings.SolverMaxIteratMethod = MaxIterationMethod.SqrtProblemSize;
            //relevant for conjugate gradient methods only
            settings.StressSettings.ResidualTolerance         = 0.01;
            settings.StressSettings.CancelAfterFirstConjugate = true;

            testList.Add(Tuple.Create("PRISM-CG", settings)); //prism +precond. conjugate gradient

            settings = settings.Clone();
            settings.StressSettings.SolverMaxIteratMethod = MaxIterationMethod.LinearProblemSize;
            settings.StressSettings.ResidualTolerance     = 0.01;
            settings.StressSettings.SolvingMethod         = SolvingMethod.PrecondConjugateGradient;
//            testList.Add(Tuple.Create("PRISM-CG-2", settings));

            //settings = settings.Clone();
            //settings.StressSettings.MaxStressIterations = 15;
            //settings.StressSettings.SolvingMethod = SolvingMethod.Localized;
            //testList.Add(Tuple.Create("PRISM-LM",settings));

            settings        = settings.Clone();
            settings.Method = OverlapRemovalMethod.MinimalSpanningTree;
            testList.Add(Tuple.Create("GTree", settings));

            return(testList);
        }