public void Execute()
        {
            if (this.input == null)
            {
                GuiLogMessage("No input!", NotificationLevel.Error);
                return;
            }

            if (this.ControlMaster == null)
            {
                GuiLogMessage("You have to connect the Transposition component to the Transpostion Analyzer control!", NotificationLevel.Error);
                return;
            }

            if (this.costMaster == null)
            {
                GuiLogMessage("You have to connect the Cost Function component to the Transpostion Analyzer control!", NotificationLevel.Error);
                return;
            }

            comparer = new ValueKeyComparer(costMaster.GetRelationOperator() != RelationOperator.LargerThen);
            TOPLIST  = new HighscoreList(comparer, 10);

            myPresentation.Dispatcher.BeginInvoke(DispatcherPriority.Normal, (SendOrPostCallback) delegate { myPresentation.entries.Clear(); }, null);

            switch (this.settings.Analysis_method)
            {
            case 0: GuiLogMessage("Starting Brute-Force Analysis", NotificationLevel.Info); BruteforceAnalysis(); break;

            case 1: GuiLogMessage("Starting Crib Analysis", NotificationLevel.Info); CribAnalysis(crib, input); break;

            case 2: GuiLogMessage("Starting Genetic Analysis", NotificationLevel.Info); GeneticAnalysis(); break;

            case 3: GuiLogMessage("Starting Hill Climbing Analysis", NotificationLevel.Info); HillClimbingAnalysis(); break;
            }

            ProgressChanged(1, 1);
        }
Exemple #2
0
 public HighscoreList(ValueKeyComparer comparer, int Capacity)
 {
     this.comparer = comparer;
     this.Capacity = Capacity;
 }