Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/19/17 16:53:09 (8 years ago)
Author:
bburlacu
Message:

#1772: Merge trunk changes.

Location:
branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic

  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/ArithmeticExpressionGrammar.cs

    r14312 r14878  
    5353      constant.MaxValue = 20;
    5454      var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable();
     55      var binFactorVariableSymbol = new BinaryFactorVariable();
     56      var factorVariableSymbol = new FactorVariable();
    5557
    56       var allSymbols = new List<Symbol>() { add, sub, mul, div, constant, variableSymbol };
     58      var allSymbols = new List<Symbol>() { add, sub, mul, div, constant, variableSymbol, binFactorVariableSymbol, factorVariableSymbol};
    5759      var functionSymbols = new List<Symbol>() { add, sub, mul, div };
    5860
     
    6567      SetSubtreeCount(constant, 0, 0);
    6668      SetSubtreeCount(variableSymbol, 0, 0);
     69      SetSubtreeCount(binFactorVariableSymbol, 0, 0);
     70      SetSubtreeCount(factorVariableSymbol, 0, 0);
    6771
    6872      // allow each symbol as child of the start symbol
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/FullFunctionalExpressionGrammar.cs

    r14312 r14878  
    115115      constant.MaxValue = 20;
    116116      var variableSymbol = new HeuristicLab.Problems.DataAnalysis.Symbolic.Variable();
     117      var binFactorVariable = new BinaryFactorVariable();
     118      var factorVariable = new FactorVariable();
    117119      var laggedVariable = new LaggedVariable();
    118120      laggedVariable.InitialFrequency = 0.0;
     
    123125      var allSymbols = new List<Symbol>() { add, sub, mul, div, mean, sin, cos, tan, log, square, pow, sqrt, root, exp,
    124126        airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral,
    125         @if, gt, lt, and, or, not,xor, timeLag, integral, derivative, constant, variableSymbol, laggedVariable,autoregressiveVariable, variableCondition };
     127        @if, gt, lt, and, or, not,xor, timeLag, integral, derivative, constant, variableSymbol, binFactorVariable, factorVariable, laggedVariable,autoregressiveVariable, variableCondition };
    126128      var unaryFunctionSymbols = new List<Symbol>() { square, sqrt, sin, cos, tan, log, exp, not, timeLag, integral, derivative,
    127129        airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, fresnelCosineIntegral, fresnelSineIntegral, gamma, hypCosineIntegral, hypSineIntegral, norm, psi, sineIntegral
     
    130132      var binaryFunctionSymbols = new List<Symbol>() { pow, root, gt, lt, variableCondition };
    131133      var ternarySymbols = new List<Symbol>() { add, sub, mul, div, mean, and, or, xor };
    132       var terminalSymbols = new List<Symbol>() { variableSymbol, constant, laggedVariable, autoregressiveVariable };
     134      var terminalSymbols = new List<Symbol>() { variableSymbol, binFactorVariable, factorVariable, constant, laggedVariable, autoregressiveVariable };
    133135
    134136      foreach (var symb in allSymbols)
  • branches/HeuristicLab.EvolutionTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs

    r14312 r14878  
    2626using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    28 using HeuristicLab.Problems.DataAnalysis.Symbolic.Symbols;
    2928
    3029namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
     
    8887      var psi = new Psi();
    8988      var sineIntegral = new SineIntegral();
    90       var passthrough = new Passthrough();
    9189
    9290      var @if = new IfThenElse();
     
    107105      constant.MaxValue = 20;
    108106      var variableSymbol = new Variable();
     107      var binFactorVariable = new BinaryFactorVariable();
     108      var factorVariable = new FactorVariable();
    109109      var laggedVariable = new LaggedVariable();
    110110      var autoregressiveVariable = new AutoregressiveTargetVariable();
     
    115115      var trigonometricSymbols = new GroupSymbol(TrigonometricFunctionsName, new List<ISymbol>() { sin, cos, tan });
    116116      var exponentialAndLogarithmicSymbols = new GroupSymbol(ExponentialFunctionsName, new List<ISymbol> { exp, log });
    117       var specialFunctions = new GroupSymbol(SpecialFunctionsName, new List<ISymbol> { airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi, 
    118         fresnelCosineIntegral,fresnelSineIntegral,gamma,hypCosineIntegral,hypSineIntegral,norm, psi, sineIntegral, passthrough});
    119       var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { constant, variableSymbol });
     117      var specialFunctions = new GroupSymbol(SpecialFunctionsName, new List<ISymbol> { airyA, airyB, bessel, cosineIntegral, dawson, erf, expIntegralEi,
     118        fresnelCosineIntegral,fresnelSineIntegral,gamma,hypCosineIntegral,hypSineIntegral,norm, psi, sineIntegral});
     119      var terminalSymbols = new GroupSymbol(TerminalsName, new List<ISymbol> { constant, variableSymbol, binFactorVariable, factorVariable });
    120120      var realValuedSymbols = new GroupSymbol(RealValuedSymbolsName, new List<ISymbol>() { arithmeticSymbols, trigonometricSymbols, exponentialAndLogarithmicSymbols, specialFunctions, terminalSymbols });
    121121
     
    159159      SetSubtreeCount(laggedVariable, 0, 0);
    160160      SetSubtreeCount(autoregressiveVariable, 0, 0);
    161       SetSubtreeCount(passthrough, 1, 1);
    162161      #endregion
    163162
     
    228227      AddAllowedChildSymbol(derivative, powerSymbols);
    229228      AddAllowedChildSymbol(derivative, conditionSymbols);
    230 
    231       AddAllowedChildSymbol(passthrough, realValuedSymbols);
    232       AddAllowedChildSymbol(passthrough, powerSymbols);
    233       AddAllowedChildSymbol(passthrough, conditionSymbols);
    234       AddAllowedChildSymbol(passthrough, timeSeriesSymbols);
    235       AddAllowedChildSymbol(passthrough, specialFunctions);
    236229      #endregion
    237230    }
Note: See TracChangeset for help on using the changeset viewer.