Changeset 16345
- Timestamp:
- 12/07/18 15:31:53 (6 years ago)
- Location:
- branches/2915-AbsoluteSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2915-AbsoluteSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/BatchOperations.cs
r16304 r16345 89 89 a[i] = Math.Sqrt(b[i]); 90 90 } 91 92 public static void Cube(double[] a, double[] b) { 93 for (int i = 0; i < BATCHSIZE; ++i) 94 a[i] = Math.Pow(b[i], 3d); 95 } 96 97 public static void CubeRoot(double[] a, double[] b) { 98 for (int i = 0; i < BATCHSIZE; ++i) 99 a[i] = Math.Pow(b[i], 1d / 3d); 100 } 101 102 public static void Absolute(double[] a, double[] b) { 103 for (int i = 0; i < BATCHSIZE; ++i) 104 a[i] = Math.Abs(a[i]); 105 } 106 107 public static void AnalyticQuotient(double[] a, double[] b) { 108 for (int i = 0; i < BATCHSIZE; ++i) 109 a[i] = a[i] / Math.Sqrt(1d + b[i] * b[i]); 110 } 91 111 } 92 112 } -
branches/2915-AbsoluteSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeBatchInterpreter.cs
r16304 r16345 120 120 } 121 121 122 case OpCodes.Cube: { 123 Cube(instr.buf, code[c].buf); 124 break; 125 } 126 case OpCodes.CubeRoot: { 127 CubeRoot(instr.buf, code[c].buf); 128 break; 129 } 130 122 131 case OpCodes.Power: { 123 Pow(instr.buf, code[c].buf); 132 Load(instr.buf, code[c].buf); 133 Pow(instr.buf, code[c + 1].buf); 124 134 break; 125 135 } … … 147 157 case OpCodes.Tan: { 148 158 Tan(instr.buf, code[c].buf); 159 break; 160 } 161 case OpCodes.Absolute: { 162 Absolute(instr.buf, code[c].buf); 163 break; 164 } 165 case OpCodes.AnalyticalQuotient: { 166 Load(instr.buf, code[c].buf); 167 AnalyticQuotient(instr.buf, code[c].buf); 149 168 break; 150 169 }
Note: See TracChangeset
for help on using the changeset viewer.