Changeset 15189 for branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration
- Timestamp:
- 07/10/17 21:36:03 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PushGP/HeuristicLab.PushGP/HeuristicLab.Problems.ProgramSynthesis/Push/Configuration/PushConfigurationBase.cs
r15032 r15189 48 48 set 49 49 { 50 var removedExpressions = enabledExpressions.To Array();50 var removedExpressions = enabledExpressions.ToList(); 51 51 enabledExpressions.Clear(); 52 52 enabledExpressions.AddRange(value); … … 68 68 var attribute = ExpressionTable.TypeToAttributeTable[type]; 69 69 70 expressionsPerStackCount[attribute.StackType]++; 70 if (expressionsPerStackCount.ContainsKey(attribute.StackType)) { 71 expressionsPerStackCount[attribute.StackType]++; 72 } 71 73 72 74 foreach (var additionalStackType in attribute.AdditionalStackDependencies.ToValues()) … … 150 152 151 153 enabledExpressions.Add(expressionName); 152 expressionsPerStackCount[attribute.StackType]++; 153 foreach (var additionalStackType in attribute.AdditionalStackDependencies.ToValues()) 154 155 if (expressionsPerStackCount.ContainsKey(attribute.StackType)) 156 expressionsPerStackCount[attribute.StackType]++; 157 158 foreach (var additionalStackType in attribute.AdditionalStackDependencies.ToValues().Where(expressionsPerStackCount.ContainsKey)) 154 159 expressionsPerStackCount[additionalStackType]++; 155 160 … … 172 177 173 178 enabledExpressions.Remove(expressionName); 174 expressionsPerStackCount[attribute.StackType]--; 175 foreach (var additionalStackType in attribute.AdditionalStackDependencies.ToValues()) 179 180 if (expressionsPerStackCount.ContainsKey(attribute.StackType)) 181 expressionsPerStackCount[attribute.StackType]--; 182 183 foreach (var additionalStackType in attribute.AdditionalStackDependencies.ToValues().Where(expressionsPerStackCount.ContainsKey)) 176 184 expressionsPerStackCount[additionalStackType]--; 177 185
Note: See TracChangeset
for help on using the changeset viewer.