Package org.apache.flink.types

Examples of org.apache.flink.types.DoubleValue


  @Override
  protected DoubleValue[] getTestData() {
    Random rnd = new Random(874597969123412341L);
    Double rndDouble = rnd.nextDouble() * Double.MAX_VALUE;
   
    return new DoubleValue[] {new DoubleValue(0), new DoubleValue(1), new DoubleValue(-1),
              new DoubleValue(Double.MAX_VALUE), new DoubleValue(Double.MIN_VALUE),
              new DoubleValue(rndDouble), new DoubleValue(-rndDouble),
              new DoubleValue(Double.NaN),
              new DoubleValue(Double.NEGATIVE_INFINITY), new DoubleValue(Double.POSITIVE_INFINITY)};
  }
View Full Code Here


    }
  }
 
  @Override
  public DoubleValue createValue() {
    return new DoubleValue();
  }
View Full Code Here

  }
 
  @Override
  public DoubleValue[] getValidTestResults() {
    return new DoubleValue[] {
      new DoubleValue(0d), new DoubleValue(0.0d), new DoubleValue(123.4d), new DoubleValue(0.124d),
      new DoubleValue(.623d), new DoubleValue(1234d), new DoubleValue(-12.34d),
      new DoubleValue(Double.MAX_VALUE), new DoubleValue(Double.MIN_VALUE),
      new DoubleValue(Double.NEGATIVE_INFINITY), new DoubleValue(Double.POSITIVE_INFINITY),
      new DoubleValue(Double.NaN),
      new DoubleValue(1.234E2), new DoubleValue(1.234e3), new DoubleValue(1.234E-2)
    };
  }
View Full Code Here

       
        // make a few calls with various types
//        proxy.methodWithNoParameters();
       
        assertEquals(19, proxy.methodWithPrimitives(16, new StringValue("abc")));
        assertEquals(new DoubleValue(17.0), proxy.methodWithWritables(new LongValue(17)));
      }
      finally {
        if (proxy != null) {
          RPC.stopProxy(proxy);
        }
View Full Code Here

      return intParam + writableParam.length();
    }

    @Override
    public DoubleValue methodWithWritables(LongValue writableParam) {
      return new DoubleValue(writableParam.getValue());
    }
View Full Code Here

TOP

Related Classes of org.apache.flink.types.DoubleValue

Copyright © 2018 www.massapicom. 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.