Free cookie consent management tool by TermsFeed Policy Generator

Changeset 16270


Ignore:
Timestamp:
11/01/18 19:59:49 (6 years ago)
Author:
bburlacu
Message:

#2950: Fix compilation error in SymbolicDataAnalysisExpressionDiversityPreservingCrossover

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Crossovers/SymbolicDataAnalysisExpressionDiversityPreservingCrossover.cs

    r16263 r16270  
    8181      if (proportionalSampling) {
    8282        var p = internalCrossoverPointProbability;
    83         var weights0 = nodes0.Select(x => x.IsChild ? 1 - p : p);
     83        var weights0 = nodes0.Select(x => x.IsLeaf ? 1 - p : p);
    8484        sampled0 = nodes0.SampleProportionalWithoutRepetition(random, nodes0.Length, weights0, windowing: windowing).ToArray();
    8585
    86         var weights1 = nodes1.Select(x => x.IsChild ? 1 - p : p);
     86        var weights1 = nodes1.Select(x => x.IsLeaf ? 1 - p : p);
    8787        sampled1 = nodes1.SampleProportionalWithoutRepetition(random, nodes1.Length, weights1, windowing: windowing).ToArray();
    8888      } else {
     
    133133
    134134      if (chooseInternal) {
    135         list.AddRange(nodes.Where(x => !x.IsChild && x.Data.Parent != null));
     135        list.AddRange(nodes.Where(x => !x.IsLeaf && x.Data.Parent != null));
    136136      }
    137137      if (!chooseInternal || list.Count == 0) {
    138         list.AddRange(nodes.Where(x => x.IsChild && x.Data.Parent != null));
     138        list.AddRange(nodes.Where(x => x.IsLeaf && x.Data.Parent != null));
    139139      }
    140140
Note: See TracChangeset for help on using the changeset viewer.