- Timestamp:
- 08/30/10 10:04:03 (14 years ago)
- Location:
- branches/DataAnalysis
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis
-
Property
svn:mergeinfo
set to
/trunk/sources merged eligible
-
Property
svn:mergeinfo
set to
-
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/ArithmeticExpressionGrammar.cs
r4068 r4341 30 30 [Item("ArithmeticExpressionGrammar", "Represents a grammar for functional expressions using only arithmetic operations.")] 31 31 public class ArithmeticExpressionGrammar : DefaultSymbolicExpressionGrammar { 32 [Storable]33 private HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols.Variable variableSymbol;34 35 32 public ArithmeticExpressionGrammar() 36 33 : base() { … … 49 46 constant.MinValue = -20; 50 47 constant.MaxValue = 20; 51 var iableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols.Variable();48 var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols.Variable(); 52 49 53 50 var allSymbols = new List<Symbol>() { add, sub, mul, div, constant, variableSymbol }; -
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/FullFunctionalExpressionGrammar.cs
r4068 r4341 30 30 [Item("FullFunctionalExpressionGrammar", "Represents a grammar for functional expressions using all available functions.")] 31 31 public class FullFunctionalExpressionGrammar : DefaultSymbolicExpressionGrammar { 32 [Storable]33 private HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols.Variable variableSymbol;34 35 32 public FullFunctionalExpressionGrammar() 36 33 : base() { … … 60 57 constant.MinValue = -20; 61 58 constant.MaxValue = 20; 62 variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols.Variable(); 59 var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols.Variable(); 60 var laggedVariable = new LaggedVariable(); 61 laggedVariable.InitialFrequency = 0.0; 63 62 64 var allSymbols = new List<Symbol>() { add, sub, mul, div, mean, sin, cos, tan, log, exp, @if, gt, lt, and, or, not, constant, variableSymbol };63 var allSymbols = new List<Symbol>() { add, sub, mul, div, mean, sin, cos, tan, log, exp, @if, gt, lt, and, or, not, constant, variableSymbol, laggedVariable }; 65 64 var unaryFunctionSymbols = new List<Symbol>() { sin, cos, tan, log, exp, not }; 66 65 var binaryFunctionSymbols = new List<Symbol>() { gt, lt }; 67 66 var functionSymbols = new List<Symbol>() { add, sub, mul, div, mean, and, or }; 67 var terminalSymbols = new List<Symbol>() { variableSymbol, constant, laggedVariable }; 68 68 69 69 foreach (var symb in allSymbols) … … 83 83 } 84 84 85 foreach (var terminalSymbol in terminalSymbols) { 86 SetMinSubtreeCount(terminalSymbol, 0); 87 SetMaxSubtreeCount(terminalSymbol, 0); 88 } 89 85 90 SetMinSubtreeCount(@if, 3); 86 91 SetMaxSubtreeCount(@if, 3); 87 SetMinSubtreeCount(constant, 0); 88 SetMaxSubtreeCount(constant, 0); 89 SetMinSubtreeCount(variableSymbol, 0); 90 SetMaxSubtreeCount(variableSymbol, 0); 92 91 93 92 94 // allow each symbol as child of the start symbol
Note: See TracChangeset
for help on using the changeset viewer.