Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/07/18 15:31:53 (6 years ago)
Author:
gkronber
Message:

#2915: added cube, cbrt, absolute, aq to batched interpreter (and fixed a bug in power)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2915-AbsoluteSymbol/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/BatchOperations.cs

    r16304 r16345  
    8989        a[i] = Math.Sqrt(b[i]);
    9090    }
     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    }
    91111  }
    92112}
Note: See TracChangeset for help on using the changeset viewer.