Examples of doubleValue()


Examples of java.util.concurrent.atomic.AtomicLong.doubleValue()

         
        });
       

        if (experimentRunner.isInteractive())
          System.out.println("\nLOG of comparisons performed: "+Math.log10(comparisonsPerformed.doubleValue())+"\n");
      }
    }

    final int presetForBestResults = 0;
   
View Full Code Here

Examples of javax.json.JsonNumber.doubleValue()

    simulation.setResolution(resolution != null ? resolution.longValue()
        : 1000L);

    JsonNumber temperature = simulationObject.getJsonNumber("temperature");
    if (temperature != null) {
      simulation.getContext().setTemperature(temperature.doubleValue());
    }
    JsonNumber brightness = simulationObject.getJsonNumber("brightness");
    if (brightness != null) {
      simulation.getContext().setBrightness(brightness.doubleValue());
    }
View Full Code Here

Examples of krati.io.serializer.DoubleSerializer.doubleValue()

    public void testCustomApi() {
        DoubleSerializer serializer = createSerializer();
       
        double val = 0;
        assertEquals(val, serializer.doubleValue(serializer.doubleBytes(val)));
        val = minValue();
        assertEquals(val, serializer.doubleValue(serializer.doubleBytes(val)));
        val = maxValue();
        assertEquals(val, serializer.doubleValue(serializer.doubleBytes(val)));
        val = anyValue();
View Full Code Here

Examples of net.fortytwo.ripple.model.NumericValue.doubleValue()

            NumericValue n = (NumericValue) v;
            switch (n.getDatatype()) {
                case DECIMAL:
                    return n.decimalValue();
                case DOUBLE:
                    return n.doubleValue();
                case FLOAT:
                    return n.floatValue();
                case INTEGER:
                    return n.intValue();
                case LONG:
View Full Code Here

Examples of nz.govt.natlib.meta.log.LogLevel.doubleValue()

      }
    } else if (type.getSuperclass() == java.lang.Number.class) {
      Number n1 = (Number) data.getValueAt(row1, column);
      double d1 = n1.doubleValue();
      Number n2 = (Number) data.getValueAt(row2, column);
      double d2 = n2.doubleValue();

      if (d1 < d2) {
        return -1;
      } else if (d1 > d2) {
        return 1;
View Full Code Here

Examples of org.apache.commons.lang.math.Fraction.doubleValue()

                return new Duration(fraction.multiplyBy(
                        Fraction.getFraction(DAY_MILLISECONDS, 1)).intValue());
            } catch (ArithmeticException e) {
                // if fraction overflows use floating point arithmetic
                return new Duration(
                        (int) (fraction.doubleValue() * DAY_MILLISECONDS));
            }
        }

        @SuppressWarnings("unchecked")
        private Fraction fractionOfWorkingDayFor(EffortDuration effortDuration) {
View Full Code Here

Examples of org.apache.commons.lang.mutable.MutableDouble.doubleValue()

      // also compute the max value across all Stores on this server
      final String maxKey = getStoreMetricNameMax(storeMetricType);
      MutableDouble cur = tmpMap.get(maxKey);
      if (cur == null) {
        tmpMap.put(maxKey, new MutableDouble(val));
      } else if (cur.doubleValue() < val) {
        cur.setValue(val);
      }
    } else {
      ALL_SCHEMA_METRICS.accumulateStoreMetric(tmpMap, storeMetricType, val);
    }
View Full Code Here

Examples of org.apache.commons.lang.mutable.MutableInt.doubleValue()

          (double) totalDocuments;
    }

    double weightedProbability(String word) {
      MutableInt i = features.get(word);
      return (i == null ? 0.1 : (i.doubleValue() /
          (double) numDocuments));
    }

    public String toString() {
      StringBuilder sb = new StringBuilder();
View Full Code Here

Examples of org.apache.commons.math3.fraction.BigFraction.doubleValue()

                    final BigFraction dx      = c2[0].subtract(centerX);
                    final BigFraction dy      = c3[0].subtract(centerY);
                    final BigFraction r2      = dx.multiply(dx).add(dy.multiply(dy));
                    return new EnclosingBall<Euclidean2D, Vector2D>(new Vector2D(centerX.doubleValue(),
                                                                                 centerY.doubleValue()),
                                                                    FastMath.sqrt(r2.doubleValue()),
                                                                    vA, vB, vC);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.commons.weaver.test.beans.ComplexAnnotations.NestAnnotation.doubleValue()

        assertTrue(Arrays.equals(new boolean[] { false }, nest1.booleanValues()));
        assertEquals((byte) 0, nest1.byteValue());
        assertArrayEquals(new byte[] { 0 }, nest1.byteValues());
        assertEquals((char) 0, nest1.charValue());
        assertArrayEquals(new char[] { 0 }, nest1.charValues());
        assertEquals(Double.valueOf(0.0), Double.valueOf(nest1.doubleValue()));
        assertTrue(Arrays.equals(new double[] { 0.0 }, nest1.doubleValues()));
        assertEquals(Float.valueOf(0.0f), Float.valueOf(nest1.floatValue()));
        assertTrue(Arrays.equals(new float[] { 0.0f }, nest1.floatValues()));
        assertEquals(0, nest1.intValue());
        assertArrayEquals(new int[] { 0 }, nest1.intValues());
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.