Changeset 7344 for branches/gp-crossover/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs
- Timestamp:
- 01/17/12 15:18:03 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gp-crossover/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs
r6849 r7344 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 1Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 48 48 internal delegate double CompiledFunction(int sampleIndex, IList<double>[] columns); 49 49 private const string CheckExpressionsWithIntervalArithmeticParameterName = "CheckExpressionsWithIntervalArithmetic"; 50 private const string EvaluatedSolutionsParameterName = "EvaluatedSolutions"; 50 51 #region private classes 51 52 private class InterpreterState { … … 156 157 get { return (IValueParameter<BoolValue>)Parameters[CheckExpressionsWithIntervalArithmeticParameterName]; } 157 158 } 159 160 public IValueParameter<IntValue> EvaluatedSolutionsParameter { 161 get { return (IValueParameter<IntValue>)Parameters[EvaluatedSolutionsParameterName]; } 162 } 158 163 #endregion 159 164 … … 162 167 get { return CheckExpressionsWithIntervalArithmeticParameter.Value; } 163 168 set { CheckExpressionsWithIntervalArithmeticParameter.Value = value; } 169 } 170 171 public IntValue EvaluatedSolutions { 172 get { return EvaluatedSolutionsParameter.Value; } 173 set { EvaluatedSolutionsParameter.Value = value; } 164 174 } 165 175 #endregion … … 176 186 : base("SymbolicDataAnalysisExpressionTreeILEmittingInterpreter", "Interpreter for symbolic expression trees.") { 177 187 Parameters.Add(new ValueParameter<BoolValue>(CheckExpressionsWithIntervalArithmeticParameterName, "Switch that determines if the interpreter checks the validity of expressions with interval arithmetic before evaluating the expression.", new BoolValue(false))); 178 } 188 Parameters.Add(new ValueParameter<IntValue>(EvaluatedSolutionsParameterName, "A counter for the total number of solutions the interpreter has evaluated", new IntValue(0))); 189 } 190 191 #region state 192 public void InitializeState() { 193 EvaluatedSolutions.Value = 0; 194 } 195 196 public void ClearState() { 197 EvaluatedSolutions.Value = 0; 198 } 199 #endregion 179 200 180 201 public IEnumerable<double> GetSymbolicExpressionTreeValues(ISymbolicExpressionTree tree, Dataset dataset, IEnumerable<int> rows) { … … 584 605 //to determine the relative amounts of the true and false branch see http://en.wikipedia.org/wiki/Logistic_function 585 606 case OpCodes.VariableCondition: { 586 throw new Not ImplementedException();587 } 588 default: throw new NotSupportedException( );607 throw new NotSupportedException("Interpretation of symbol " + currentInstr.dynamicNode.Symbol.Name + " is not supported by the SymbolicDataAnalysisTreeILEmittingInterpreter"); 608 } 609 default: throw new NotSupportedException("Interpretation of symbol " + currentInstr.dynamicNode.Symbol.Name + " is not supported by the SymbolicDataAnalysisTreeILEmittingInterpreter"); 589 610 } 590 611 }
Note: See TracChangeset
for help on using the changeset viewer.