Free cookie consent management tool by TermsFeed Policy Generator

Changeset 18205


Ignore:
Timestamp:
01/21/22 11:51:56 (3 years ago)
Author:
dpiringe
Message:

#3136

  • changed visibility of string constants in TypeCoherentExpressionGrammar from private to public
  • changed default grammar for SubFunction
Location:
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Grammars/TypeCoherentExpressionGrammar.cs

    r18146 r18205  
    3030  [Item("TypeCoherentExpressionGrammar", "Represents a grammar for functional expressions in which special syntactic constraints are enforced so that boolean and real-valued expressions are not mixed.")]
    3131  public class TypeCoherentExpressionGrammar : DataAnalysisGrammar, ISymbolicDataAnalysisGrammar {
    32     private const string ArithmeticFunctionsName = "Arithmetic Functions";
    33     private const string TrigonometricFunctionsName = "Trigonometric Functions";
    34     private const string ExponentialFunctionsName = "Exponential and Logarithmic Functions";
    35     private const string RealValuedSymbolsName = "Real Valued Symbols";
    36     private const string TerminalsName = "Terminals";
    37     private const string PowerFunctionsName = "Power Functions";
    38     private const string ConditionsName = "Conditions";
    39     private const string ComparisonsName = "Comparisons";
    40     private const string BooleanOperatorsName = "Boolean Operators";
    41     private const string ConditionalSymbolsName = "ConditionalSymbols";
    42     private const string SpecialFunctionsName = "Special Functions";
    43     private const string TimeSeriesSymbolsName = "Time Series Symbols";
     32    public const string ArithmeticFunctionsName = "Arithmetic Functions";
     33    public const string TrigonometricFunctionsName = "Trigonometric Functions";
     34    public const string ExponentialFunctionsName = "Exponential and Logarithmic Functions";
     35    public const string RealValuedSymbolsName = "Real Valued Symbols";
     36    public const string TerminalsName = "Terminals";
     37    public const string PowerFunctionsName = "Power Functions";
     38    public const string ConditionsName = "Conditions";
     39    public const string ComparisonsName = "Comparisons";
     40    public const string BooleanOperatorsName = "Boolean Operators";
     41    public const string ConditionalSymbolsName = "ConditionalSymbols";
     42    public const string SpecialFunctionsName = "Special Functions";
     43    public const string TimeSeriesSymbolsName = "Time Series Symbols";
    4444
    4545    [StorableConstructor]
  • branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/StructureTemplate/SubFunction.cs

    r18199 r18205  
    4949    #region Constructors
    5050    public SubFunction() {
    51       Parameters.Add(new ValueParameter<ISymbolicDataAnalysisGrammar>(GrammarParameterName, new ArithmeticExpressionGrammar()));
     51      var grammar = new TypeCoherentExpressionGrammar();
     52      grammar.ConfigureAsDefaultRegressionGrammar();
     53      grammar.Symbols.First(s => s.Name == TypeCoherentExpressionGrammar.ExponentialFunctionsName).Enabled = false;
     54      Parameters.Add(new ValueParameter<ISymbolicDataAnalysisGrammar>(GrammarParameterName, grammar));
    5255      Parameters.Add(new FixedValueParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, new IntValue(8)));
    5356      Parameters.Add(new FixedValueParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, new IntValue(20)));
     
    7174    }
    7275    #endregion
    73 
    7476
    7577    #region Event Handling
Note: See TracChangeset for help on using the changeset viewer.