Examples of DoubleOp


Examples of com.urbanairship.datacube.ops.DoubleOp

public class OpTests {

    @Test
    public void testDoubleOp() {
        DoubleOp onePt2 = new DoubleOp(1.2);
        byte[] bytes = onePt2.serialize();
        DoubleOp.DoubleOpDeserializer deserializer = new DoubleOp.DoubleOpDeserializer();
        DoubleOp deserialized = deserializer.fromBytes(bytes);
        Assert.assertEquals(onePt2, deserialized);

        Op add = onePt2.add(deserialized);
        Assert.assertEquals(new DoubleOp(2.4), add);
    }
View Full Code Here

Examples of groovyx.gpars.extra166y.Ops.DoubleOp

     * of applying the first one.
     */
    public static DoubleOp compoundOp
        (final DoubleOp first,
         final DoubleOp second) {
        return new DoubleOp() {
                public final double op(double t) { return second.op(first.op(t)); }
            };
    }
View Full Code Here

Examples of groovyx.gpars.extra166y.Ops.DoubleOp

     * of applying the first one.
     */
    public static <T> DoubleOp compoundOp
        (final DoubleToObject<? extends T> first,
         final ObjectToDouble<? super T> second) {
        return new DoubleOp() {
                public final double op(double t) { return second.op(first.op(t)); }
            };
    }
View Full Code Here

Examples of groovyx.gpars.extra166y.Ops.DoubleOp

     * of applying the first one.
     */
    public static DoubleOp compoundOp
        (final DoubleToLong first,
         final LongToDouble second) {
        return new DoubleOp() {
                public final double op(double t) { return second.op(first.op(t)); }
            };
    }
View Full Code Here

Examples of org.jquantlib.math.Ops.DoubleOp

  }

  @Test
  public void testExp() {
    final DoubleOp exp = new DoubleOp() {
      public double op(final double x) {
        return Math.exp(x);
      }
    };
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.