Changeset 14456 for branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Permutation/LocalSearch/StaticAPI/Exhaustive.cs
- Timestamp:
- 12/06/16 15:07:45 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/MemPRAlgorithm/HeuristicLab.Algorithms.MemPR/3.3/Permutation/LocalSearch/StaticAPI/Exhaustive.cs
r14450 r14456 35 35 public static Tuple<int, int> HillClimb(IRandom random, Encodings.PermutationEncoding.Permutation perm, 36 36 ref double quality, bool maximization, Func<Encodings.PermutationEncoding.Permutation, double> eval, 37 CancellationToken token, bool[,] noTouch= null) {37 CancellationToken token, bool[,] subspace = null) { 38 38 if (double.IsNaN(quality)) quality = eval(perm); 39 39 Tuple<int, int> changes; 40 40 switch (perm.PermutationType) { 41 41 case PermutationTypes.Absolute: 42 changes = ExhaustiveSwap2.HillClimb(random, perm, ref quality, maximization, eval, token, noTouch);42 changes = ExhaustiveSwap2.HillClimb(random, perm, ref quality, maximization, eval, token, subspace); 43 43 break; 44 44 case PermutationTypes.RelativeDirected: 45 changes = Exhaustive1Shift.HillClimb(random, perm, ref quality, maximization, eval, token, noTouch);45 changes = Exhaustive1Shift.HillClimb(random, perm, ref quality, maximization, eval, token, subspace); 46 46 break; 47 47 case PermutationTypes.RelativeUndirected: 48 changes = Exhaustive2Opt.HillClimb(random, perm, ref quality, maximization, eval, token, noTouch);48 changes = Exhaustive2Opt.HillClimb(random, perm, ref quality, maximization, eval, token, subspace); 49 49 break; 50 50 default: throw new ArgumentException(string.Format("Permutation type {0} is not known", perm.PermutationType));
Note: See TracChangeset
for help on using the changeset viewer.