Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/05/14 18:25:03 (9 years ago)
Author:
bgoldman
Message:

#2282 Evaluation counting, results and graphing, HIFF problem.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/Parameter-less Population Pyramid/HeuristicLab.Algorithms.ParameterlessPopulationPyramid/3.3/LinkageCrossover.cs

    r11663 r11666  
    3030  public static class LinkageCrossover {
    3131
    32     public static double ImproveUsingTree(LinkageTree tree, IList<bool[]> donors, bool[] solution, double fitness, BinaryVectorProblem problem, IRandom rand) {
     32    public static double ImproveUsingTree(LinkageTree tree, IList<bool[]> donors, bool[] solution, double fitness, IBinaryVectorProblem problem, IRandom rand) {
    3333      var options = Enumerable.Range(0, donors.Count).ToArray();
    3434      foreach (var cluster in tree.Clusters) {
     
    3636        // from the current solution for this cluster of genes
    3737        bool donorFound = false;
    38         foreach (var donorIndex in options.Shuffle(rand)) {
     38        foreach (var donorIndex in options.ShuffleList(rand)) {
    3939          // Attempt the donation
    4040          fitness = Donate(solution, fitness, donors[donorIndex], cluster, problem, out donorFound);
     
    4545    }
    4646
    47     private static double Donate(bool[] solution, double fitness, bool[] source, IEnumerable<int> cluster, BinaryVectorProblem problem, out bool changed) {
     47    private static double Donate(bool[] solution, double fitness, bool[] source, IEnumerable<int> cluster, IBinaryVectorProblem problem, out bool changed) {
    4848      // keep track of which bits flipped to make the donation
    4949      List<int> flipped = new List<int>();
Note: See TracChangeset for help on using the changeset viewer.