Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/21/15 01:03:12 (9 years ago)
Author:
bburlacu
Message:

#1772: Properly remove older generations in the genealogy graph. Fix namespaces in the schema diversification operators.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SchemaDiversification/SchemaEvaluator.cs

    r12952 r12958  
    3131using HeuristicLab.Random;
    3232
    33 namespace HeuristicLab.Problems.DataAnalysis.Symbolic.Tracking {
     33namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
    3434  [Item("SchemaEvaluator", "An operator that builds schemas based on the heredity relationship in the genealogy graph.")]
    3535  [StorableClass]
     
    9595      get { return (LookupParameter<IntValue>)Parameters[ChangedTreesParameterName]; }
    9696    }
    97 
    9897    #endregion
    9998
     
    180179
    181180      var s = SchemaParameter.ActualValue;
    182       var matchingIndividuals = new ScopeList(from ind in individuals
    183                                               let t = (ISymbolicExpressionTree)ind.Variables["SymbolicExpressionTree"].Value
    184                                               where qm.Match(t, s)
    185                                               select ind);
     181      var matchingIndividuals = new ScopeList();
     182      foreach (var ind in individuals) {
     183        var t = (ISymbolicExpressionTree)ind.Variables["SymbolicExpressionTree"].Value;
     184        if (t.Length >= s.Length && qm.Match(t, s))
     185          matchingIndividuals.Add(ind);
     186      }
    186187
    187188      if (matchingIndividuals.Count < MinimumSchemaFrequency.Value * individuals.Count) {
Note: See TracChangeset for help on using the changeset viewer.