Changeset 12958 for branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SchemaDiversification/SchemaEvaluator.cs
- Timestamp:
- 09/21/15 01:03:12 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tracking/SchemaDiversification/SchemaEvaluator.cs
r12952 r12958 31 31 using HeuristicLab.Random; 32 32 33 namespace HeuristicLab.Problems.DataAnalysis.Symbolic .Tracking{33 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { 34 34 [Item("SchemaEvaluator", "An operator that builds schemas based on the heredity relationship in the genealogy graph.")] 35 35 [StorableClass] … … 95 95 get { return (LookupParameter<IntValue>)Parameters[ChangedTreesParameterName]; } 96 96 } 97 98 97 #endregion 99 98 … … 180 179 181 180 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 } 186 187 187 188 if (matchingIndividuals.Count < MinimumSchemaFrequency.Value * individuals.Count) {
Note: See TracChangeset
for help on using the changeset viewer.