Changeset 17409 for branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DataAnalysis.Symbolic
- Timestamp:
- 01/28/20 12:14:21 (5 years ago)
- Location:
- branches/2925_AutoDiffForDynamicalModels
- Files:
-
- 6 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/2925_AutoDiffForDynamicalModels
-
branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Problems.DataAnalysis.Symbolic merged: 17344,17351,17402
- Property svn:mergeinfo changed
-
branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
r16988 r17409 150 150 <Compile Include="Converters\DerivativeCalculator.cs" /> 151 151 <Compile Include="Converters\TreeToAutoDiffTermConverter.cs" /> 152 <Compile Include="Creators\SymbolicDataAnalysisExpressionBalancedTreeCreator.cs" /> 152 153 <Compile Include="Crossovers\SymbolicDataAnalysisExpressionDiversityPreservingCrossover.cs" /> 153 154 <Compile Include="Formatters\InfixExpressionFormatter.cs" /> -
branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionCompiledTreeInterpreter.cs
r17246 r17409 52 52 private static readonly MethodInfo Log = typeof(Math).GetMethod("Log", new[] { typeof(double) }); 53 53 private static readonly MethodInfo IsNaN = typeof(double).GetMethod("IsNaN"); 54 private static readonly MethodInfo IsAlmost = typeof(DoubleExtensions).GetMethod("IsAlmost" );54 private static readonly MethodInfo IsAlmost = typeof(DoubleExtensions).GetMethod("IsAlmost", new Type[] { typeof(double), typeof(double)}); 55 55 private static readonly MethodInfo Gamma = typeof(alglib).GetMethod("gammafunction", new[] { typeof(double) }); 56 56 private static readonly MethodInfo Psi = typeof(alglib).GetMethod("psi", new[] { typeof(double) }); -
branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeBatchInterpreter.cs
r16892 r17409 1 using System; 1 #region License Information 2 /* HeuristicLab 3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 * 5 * This file is part of HeuristicLab. 6 * 7 * HeuristicLab is free software: you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation, either version 3 of the License, or 10 * (at your option) any later version. 11 * 12 * HeuristicLab is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>. 19 */ 20 #endregion 21 22 using System; 2 23 using System.Collections.Generic; 3 24 using System.Linq; … … 181 202 182 203 [ThreadStatic] 183 private Dictionary<string, double[]> cachedData;204 private static Dictionary<string, double[]> cachedData; 184 205 185 206 [ThreadStatic] 186 private IDataset dataset;207 private static IDataset cachedDataset; 187 208 188 209 private void InitCache(IDataset dataset) { 189 this.dataset = dataset;210 cachedDataset = dataset; 190 211 cachedData = new Dictionary<string, double[]>(); 191 212 foreach (var v in dataset.DoubleVariables) { … … 196 217 public void InitializeState() { 197 218 cachedData = null; 198 dataset = null;219 cachedDataset = null; 199 220 EvaluatedSolutions = 0; 200 221 } 201 222 202 223 private double[] GetValues(ISymbolicExpressionTree tree, IDataset dataset, int[] rows) { 203 if (cachedData == null || this.dataset != dataset) {224 if (cachedData == null || cachedDataset != dataset) { 204 225 InitCache(dataset); 205 226 } -
branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeNativeInterpreter.cs
r17246 r17409 99 99 100 100 [ThreadStatic] 101 private IDataset dataset;101 private static IDataset cachedDataset; 102 102 103 103 private static readonly HashSet<byte> supportedOpCodes = new HashSet<byte>() { … … 127 127 if (!rows.Any()) return Enumerable.Empty<double>(); 128 128 129 if (cachedData == null || this.dataset != dataset) {129 if (cachedData == null || cachedDataset != dataset) { 130 130 InitCache(dataset); 131 131 } … … 152 152 153 153 private void InitCache(IDataset dataset) { 154 this.dataset = dataset;154 cachedDataset = dataset; 155 155 156 156 // free handles to old data … … 178 178 cachedData = null; 179 179 } 180 dataset = null;180 cachedDataset = null; 181 181 EvaluatedSolutions = 0; 182 182 }
Note: See TracChangeset
for help on using the changeset viewer.