- Timestamp:
- 10/20/21 14:39:46 (3 years ago)
- Location:
- branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs
r17963 r18071 79 79 CubeRoot = 51, 80 80 Tanh = 52, 81 SubFunction = 53 81 82 }; 82 83 public static class OpCodes { … … 134 135 public const byte CubeRoot = (byte)OpCode.CubeRoot; 135 136 public const byte Tanh = (byte)OpCode.Tanh; 136 137 public const byte SubFunction = (byte)OpCode.SubFunction; 137 138 138 139 private static Dictionary<Type, byte> symbolToOpcode = new Dictionary<Type, byte>() { 139 140 { typeof(Addition), OpCodes.Add }, 140 141 { typeof(Subtraction), OpCodes.Sub }, 141 142 { typeof(Multiplication), OpCodes.Mul }, … … 189 190 { typeof(AnalyticQuotient), OpCodes.AnalyticQuotient }, 190 191 { typeof(Cube), OpCodes.Cube }, 191 { typeof(CubeRoot), OpCodes.CubeRoot } 192 { typeof(CubeRoot), OpCodes.CubeRoot }, 193 { typeof(SubFunctionSymbol), OpCodes.SubFunction } 192 194 }; 193 195 -
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs
r17180 r18071 528 528 } 529 529 } 530 case OpCodes.SubFunction: { 531 return Evaluate(dataset, ref row, state); 532 } 530 533 default: 531 534 throw new NotSupportedException(); -
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/StructureTemplate/StructureTemplate.cs
r18069 r18071 46 46 set { 47 47 applyLinearScaling = value; 48 //subFunctions = GetSubFunctions();49 48 OnChanged(); 50 49 } -
branches/3136_Structural_GP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/StructureTemplate/SubFunction.cs
r18069 r18071 52 52 #region Constructors 53 53 public SubFunction() { 54 Parameters.Add(new ValueParameter<ISymbolicDataAnalysisGrammar>(GrammarParameterName, new LinearScalingGrammar()));55 Parameters.Add(new FixedValueParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, new IntValue( 10)));56 Parameters.Add(new FixedValueParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, new IntValue( 30)));54 Parameters.Add(new ValueParameter<ISymbolicDataAnalysisGrammar>(GrammarParameterName, new ArithmeticExpressionGrammar())); 55 Parameters.Add(new FixedValueParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, new IntValue(8))); 56 Parameters.Add(new FixedValueParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, new IntValue(20))); 57 57 58 // TODO: separate events for each parameter59 58 GrammarParameter.ValueChanged += OnParameterValueChanged; 60 59 MaximumSymbolicExpressionTreeDepthParameter.Value.ValueChanged += OnParameterValueChanged;
Note: See TracChangeset
for help on using the changeset viewer.