示例#1
0
 private void runBruteForce(int[,] adjMat)
 {
     writeMessage("Running Brute Force");
     BruteForceAlgorithm algorithm = new BruteForceAlgorithm();
     var result = algorithm.getTriangle(adjMat);
     var (one, two, three) = result;
     setTriangle(one, two, three);
     if (one == -1)
         writeMessage("No Triangle Found");
     else
         writeMessage("Triangle Found at: " + g.points[one].getName() + ", " + g.points[two].getName()
             + ", " + g.points[three].getName());
     Refresh();
 }
        public virtual ISchedulingAlgorithm GetSchedulingAlgorithm(string name)
        {
            ISchedulingAlgorithm algorithm = null;

            switch (name.ToUpper())
            {
                case "DUMMY":
                    algorithm = new DummyAlgorithm();
                    break;
                case "BRUTE FORCE":
                    algorithm = new BruteForceAlgorithm(this.ShiftRuleFactory, this.ScheduleValidator);
                    break;
                default:
                    break;
            }

            return algorithm;
        }