Changeset 15977
- Timestamp:
- 06/30/18 12:53:57 (6 years ago)
- Location:
- branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration/GrammarEnumeration
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration/GrammarEnumeration/GrammarEnumerationAlgorithm.cs
r15975 r15977 437 437 } 438 438 439 // free memory at the end of the run (this saves a lot of memory) 440 ArchivedPhrases.Clear(); 441 OpenPhrases.Clear(); 442 DistinctSentencesComplexity.Clear(); 443 439 444 var tree = Grammar.ParseSymbolicExpressionTree(BestTrainingSentence); 440 445 var model = new SymbolicRegressionModel(Problem.ProblemData.TargetVariable, tree, new SymbolicDataAnalysisExpressionTreeLinearInterpreter()); -
branches/2886_SymRegGrammarEnumeration/HeuristicLab.Algorithms.DataAnalysis.SymRegGrammarEnumeration/GrammarEnumeration/SearchDataStructure.cs
r15974 r15977 82 82 private Func<int> fetchInternal; // Fetch hash-reference 83 83 84 public SearchDataStore() : this(StorageType. PriorityQueue) { }84 public SearchDataStore() : this(StorageType.SortedSet) { } 85 85 86 86 [StorableConstructor] … … 94 94 95 95 storedValues = new LruCache<int, SearchNode>(this.cacheSize); 96 InitS torage();97 } 98 99 private void InitS torage() {96 InitSearchDataStructure(); 97 } 98 99 private void InitSearchDataStructure() { 100 100 switch (storageType) { 101 101 case StorageType.PriorityQueue: … … 113 113 case StorageType.SortedSet: 114 114 InitSortedSet(); 115 break; 116 } 117 } 118 119 private void ClearSearchDataStructure() { 120 switch (storageType) { 121 case StorageType.PriorityQueue: 122 priorityQueue = null; 123 break; 124 case StorageType.Stack: 125 stack.Clear(); 126 break; 127 case StorageType.Queue: 128 queue.Clear(); 129 break; 130 case StorageType.RandomList: 131 list.Clear(); 132 break; 133 case StorageType.SortedSet: 134 sortedSet.Clear(); 115 135 break; 116 136 } … … 127 147 searchDataStructureSize = original.searchDataStructureSize; 128 148 129 InitS torage();149 InitSearchDataStructure(); 130 150 switch (storageType) { 131 151 case StorageType.PriorityQueue: … … 289 309 } 290 310 311 public void Clear() { 312 storedValues.Clear(); 313 } 314 291 315 #endregion 292 316
Note: See TracChangeset
for help on using the changeset viewer.