Examples of DoubleScalar


Examples of mikera.vectorz.impl.DoubleScalar

  }

  @Test
  public void genericTests() {
    testScalar(new Scalar(1.0));
    testScalar(new DoubleScalar(1.0)); // deprecated but still test it
    testScalar(ImmutableScalar.create(1.33));
    testScalar(Vector.of(1, 2, 3).slice(1));
    testScalar(Vector.of(1, 2, 3, 4, 5, 6).slice(1));
   
    testScalar(MatrixIndexScalar.wrap(IdentityMatrix.create(3),2,2));
View Full Code Here

Examples of org.apache.drill.exec.ref.values.ScalarValues.DoubleScalar

    case DOUBLE:
      double d = 0d;
      for(int i =0; i < values.length; i++){
        d += values[i].getAsDouble();
      }
      return new DoubleScalar(d);
    case FLOAT:
      float f = 0f;
      for(int i =0; i < values.length; i++){
        f += values[i].getAsFloat();
      }
View Full Code Here

Examples of org.apache.drill.exec.ref.values.ScalarValues.DoubleScalar

    } else if (node.isFloatingPointNumber()) {
      if (node.isBigDecimal()) {
        throw new UnsupportedOperationException();
//        return new BigDecimalScalar(node.decimalValue());
      } else {
        return new DoubleScalar(node.asDouble());
      }
    } else if (node.isInt()) {
      return new IntegerScalar(node.asInt());
    } else if (node.isLong()) {
      return new LongScalar(node.asLong());
View Full Code Here

Examples of org.apache.drill.exec.ref.values.ScalarValues.DoubleScalar

    return new LongScalar(longExpr.getLong());
  }

  @Override
  public BasicEvaluator visitDoubleConstant(DoubleExpression dExpr) {
    return new DoubleScalar(dExpr.getDouble());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.