Package org.timepedia.chronoscope.client

Examples of org.timepedia.chronoscope.client.MutableDataset


    return newDataset(request);
  }

  public MutableDataset createMutable(DatasetRequest request) {
    ArgChecker.isNotNull(request, "request");
    MutableDataset ds = new MutableDatasetND(request);
    return ds;
  }
View Full Code Here


    OODoubleArray domain = new OODoubleArray(request.getDomain());
    OODoubleArray range = new OODoubleArray(request.getRangeTupleSlice(0));
    request.setDomain(domain.removeLast().getArray());
    request.setRangeTupleSlice(0, range.removeLast().getArray());
   
    MutableDataset ds = dsFactory.createMutable(request);
    ds.mutate(Mutation.append(domain.getLast(), range.getLast()));
   
    return ds;
  }
View Full Code Here

  private DatasetRequestMaker dsMaker = new DatasetRequestMaker();
 
  public void testAppend() {
    DatasetRequest request =
      dsMaker.newRequest(new double[] {100, 200, 250}, new double[] {1, 2, 3});
    MutableDataset ds = dsFactory.createMutable(request);
   

    assertEquals(50.0, ds.getMinDomainInterval());
    assertEquals(new Interval(1, 3), ds.getRangeExtrema(0));
   
    // Add a new point whose distance from the previous point is 25 ms.  This should
    // decrease the minimum interval reported by the Dataset.
    ds.mutate(Mutation.append(275, 4));
    assertEquals(25.0, ds.getMinDomainInterval());
    assertEquals(new Interval(1, 4), ds.getRangeExtrema(0));
  }
View Full Code Here

TOP

Related Classes of org.timepedia.chronoscope.client.MutableDataset

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.