Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/04/17 23:19:44 (7 years ago)
Author:
abeham
Message:

#1614:

  • distributed code from artificial common plugin
  • removed common plugin
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Operators/Crossovers/GQAPPathRelinking.cs

    r15490 r15492  
    137137      var fix = new HashSet<int>();
    138138      var nonFix = new HashSet<int>(Enumerable.Range(0, demands.Length));
    139       var phi = new HashSet<int>((pi_prime.GetDifferingIndices(target)));
     139      var phi = new HashSet<int>((IntegerVectorEqualityComparer.GetDifferingIndices(pi_prime, target)));
    140140
    141141      while (phi.Any()) {
     
    176176              bool contains = false;
    177177              foreach (var b in B) {
    178                 if (!solution.Assignment.GetDifferingIndices(b.Assignment).Any()) {
     178                if (!IntegerVectorEqualityComparer.GetDifferingIndices(solution.Assignment, b.Assignment).Any()) {
    179179                  contains = true;
    180180                  break;
     
    189189          if (maximization.Value) pi = B.SampleProportional(random, 1, B.Select(x => x.Quality.Value), false).First();
    190190          else pi = B.SampleProportional(random, 1, B.Select(x => 1.0 / x.Quality.Value), false).First();
    191           var diff = pi.Assignment.GetDifferingIndices(target);
     191          var diff = IntegerVectorEqualityComparer.GetDifferingIndices(pi.Assignment, target);
    192192          var I = phi.Except(diff);
    193193          var i = I.SampleRandom(random);
     
    203203          }
    204204        } else return result;
    205         phi = new HashSet<int>(pi_prime.GetDifferingIndices(target));
     205        phi = new HashSet<int>(IntegerVectorEqualityComparer.GetDifferingIndices(pi_prime, target));
    206206      }
    207207
Note: See TracChangeset for help on using the changeset viewer.