Examples of incrementValue()


Examples of cc.mallet.types.HashedSparseVector.incrementValue()

  }

  public void testIncrementValue ()
  {
    HashedSparseVector s = (HashedSparseVector) s1.cloneMatrix ();
    s.incrementValue (5, 0.75);

    double[] ans = new double[] {1, 2.75, 3, 4, 5};
    for (int i = 0; i < s.numLocations(); i++) {
      assertTrue (s.valueAtLocation (i) == ans[i]);
    }
View Full Code Here

Examples of cc.mallet.types.IndexedSparseVector.incrementValue()

  }

  public void testIncrementValue ()
  {
    IndexedSparseVector s = (IndexedSparseVector) s1.cloneMatrix ();
    s.incrementValue (5, 0.75);

    double[] ans = new double[] {1, 2.75, 3, 4, 5};
    for (int i = 0; i < s.numLocations(); i++) {
      assertTrue (s.valueAtLocation (i) == ans[i]);
    }
View Full Code Here

Examples of cc.mallet.types.SparseVector.incrementValue()

  }

  public void testIncrementValue ()
  {
    SparseVector s = (SparseVector) s1.cloneMatrix ();
    s.incrementValue (5, 0.75);

    double[] ans = new double[] {1, 2.75, 3, 4, 5};
    for (int i = 0; i < s.numLocations(); i++) {
      assertTrue (s.valueAtLocation (i) == ans[i]);
    }
View Full Code Here

Examples of com.salesforce.phoenix.schema.Sequence.incrementValue()

            List<Sequence> toIncrementList = Lists.newArrayListWithExpectedSize(sequences.size());
            int[] indexes = new int[sequences.size()];
            for (int i = 0; i < sequences.size(); i++) {
                Sequence sequence = sequences.get(i);
                try {
                    values[i] = sequence.incrementValue(timestamp, factor);
                } catch (EmptySequenceCacheException e) {
                    indexes[toIncrementList.size()] = i;
                    toIncrementList.add(sequence);
                    Increment inc = sequence.newIncrement(timestamp);
                    incrementBatch.add(inc);
View Full Code Here

Examples of com.salesforce.phoenix.schema.Sequence.incrementValue()

            }
            for (int i=0;i<resultObjects.length;i++){
                Sequence sequence = toIncrementList.get(i);
                Result result = (Result)resultObjects[i];
                try {
                    values[indexes[i]] = sequence.incrementValue(result, factor);
                } catch (SQLException e) {
                    exceptions[indexes[i]] = e;
                }
            }
        } finally {
View Full Code Here

Examples of info.ganglia.metric.type.GMetricDouble.incrementValue()

      count = generator.nextInt(100);
      countDouble = generator.nextDouble() * 100;
      System.out.println(count);
      System.out.println(countDouble);
      testMetric.incrementValue(count);
      testMetric2.incrementValue(countDouble);
    }
  }
}
 
View Full Code Here

Examples of info.ganglia.metric.type.GMetricDouble.incrementValue()

  public void testUpdateDouble() {
    double value = 10.50;
    try {
      GMonitor gmon = new GMonitor(MULTICAST_ADDRESS, 30l);
      GMetricDouble testMetric = (GMetricDouble) gmon.createGMetric(host, "Ganglia Test", GMetric.VALUE_TYPE_DOUBLE, "count", GMetric.SLOPE_UNSPECIFIED, true);
      testMetric.incrementValue(value);
      testMetric.incrementValue();
      testMetric.setValue(value);
    } catch (IOException e) {
      e.printStackTrace();
      fail();
View Full Code Here

Examples of info.ganglia.metric.type.GMetricDouble.incrementValue()

    double value = 10.50;
    try {
      GMonitor gmon = new GMonitor(MULTICAST_ADDRESS, 30l);
      GMetricDouble testMetric = (GMetricDouble) gmon.createGMetric(host, "Ganglia Test", GMetric.VALUE_TYPE_DOUBLE, "count", GMetric.SLOPE_UNSPECIFIED, true);
      testMetric.incrementValue(value);
      testMetric.incrementValue();
      testMetric.setValue(value);
    } catch (IOException e) {
      e.printStackTrace();
      fail();
    }
View Full Code Here

Examples of info.ganglia.metric.type.GMetricFloat.incrementValue()

  public void testUpdateFloat() {
    float value = 10.50f;
    try {
      GMonitor gmon = new GMonitor(MULTICAST_ADDRESS, 30l);
      GMetricFloat testMetric = (GMetricFloat) gmon.createGMetric(host, "Ganglia Test", GMetric.VALUE_TYPE_FLOAT, "count", GMetric.SLOPE_UNSPECIFIED, true);
      testMetric.incrementValue(value);
      testMetric.incrementValue();
      testMetric.setValue(value);
    } catch (IOException e) {
      e.printStackTrace();
      fail();
View Full Code Here

Examples of info.ganglia.metric.type.GMetricFloat.incrementValue()

    float value = 10.50f;
    try {
      GMonitor gmon = new GMonitor(MULTICAST_ADDRESS, 30l);
      GMetricFloat testMetric = (GMetricFloat) gmon.createGMetric(host, "Ganglia Test", GMetric.VALUE_TYPE_FLOAT, "count", GMetric.SLOPE_UNSPECIFIED, true);
      testMetric.incrementValue(value);
      testMetric.incrementValue();
      testMetric.setValue(value);
    } catch (IOException e) {
      e.printStackTrace();
      fail();
    }
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.