Example #1
0
 @SuppressWarnings("unused")
 @Specialization
 protected RDoubleVector gc(boolean verbose, boolean reset) {
   doGc();
   // TODO: somehow produce the (semi?) correct values
   double[] data = new double[14];
   Arrays.fill(data, RRuntime.DOUBLE_NA);
   return RDataFactory.createDoubleVector(data, RDataFactory.INCOMPLETE_VECTOR);
 }
Example #2
0
 @Specialization(
     guards = {"x.getLength() == 1", "times.getLength() == 1", "each <= 1", "!hasNames(x)"})
 protected RAbstractVector repNoEachNoNamesSimple(
     RAbstractDoubleVector x,
     RAbstractIntVector times,
     int lengthOut,
     @SuppressWarnings("unused") int each) {
   int t = times.getDataAt(0);
   if (t < 0) {
     errorBranch.enter();
     throw invalidTimes();
   }
   int length = lengthOutOrTimes.profile(!RRuntime.isNA(lengthOut)) ? lengthOut : t;
   double[] data = new double[length];
   Arrays.fill(data, x.getDataAt(0));
   return RDataFactory.createDoubleVector(data, !RRuntime.isNA(x.getDataAt(0)));
 }