Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/16/18 09:45:36 (6 years ago)
Author:
gkronber
Message:

#2937: added symbol for AQ and support for AQ in interpreter and AutoDiff converter

Location:
branches/2937_SymReg_AnalyticalQuotient/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2937_SymReg_AnalyticalQuotient/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/OpCodes.cs

    r15583 r16083  
    8585    public const byte FactorVariable = 46;
    8686    public const byte BinaryFactorVariable = 47;
     87    public const byte AnalyticalQuotient = 48;
    8788
    8889
     
    113114      { typeof(Power),OpCodes.Power},
    114115      { typeof(Root),OpCodes.Root},
    115       { typeof(TimeLag), OpCodes.TimeLag}, 
     116      { typeof(TimeLag), OpCodes.TimeLag},
    116117      { typeof(Integral), OpCodes.Integral},
    117118      { typeof(Derivative), OpCodes.Derivative},
     
    135136      { typeof(Bessel), OpCodes.Bessel},
    136137      { typeof(FactorVariable), OpCodes.FactorVariable },
    137       { typeof(BinaryFactorVariable), OpCodes.BinaryFactorVariable }
     138      { typeof(BinaryFactorVariable), OpCodes.BinaryFactorVariable },
     139      {typeof(AnalyticalQuotient), OpCodes.AnalyticalQuotient }
    138140    };
    139141
  • branches/2937_SymReg_AnalyticalQuotient/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeLinearInterpreter.cs

    r15583 r16083  
    215215          if (instr.nArguments == 1) p = 1.0 / p;
    216216          instr.value = p;
     217        } else if (instr.opCode == OpCodes.AnalyticalQuotient) {
     218          var x1 = code[instr.childIndex].value;
     219          var x2 = code[instr.childIndex + 1].value;
     220          instr.value = x1 / Math.Sqrt(1 + x2 * x2);
    217221        } else if (instr.opCode == OpCodes.Average) {
    218222          double s = code[instr.childIndex].value;
Note: See TracChangeset for help on using the changeset viewer.