Package cern.colt.list

Examples of cern.colt.list.DoubleArrayList.trimToSize()


        indexList.setSize(s*3/2);
        indexList.trimToSize();
        indexList.setSize(s);
       
        valueList.setSize(s*3/2);
        valueList.trimToSize();
        valueList.setSize(s);   
      }
    }
    else {
      values[i].setQuick(k,value);
View Full Code Here


        indexList.setSize(s*3/2);
        indexList.trimToSize();
        indexList.setSize(s);
       
        valueList.setSize(s*3/2);
        valueList.trimToSize();
        valueList.setSize(s);   
      }
    }
    else {
      values[i].setQuick(k,value);
View Full Code Here

      DoubleArrayList temp;
      for(int i = 0; i < data.length; i++) {
         serie = new XYSeries(" ");

         temp = data[i].copy()// deep copy
         temp.trimToSize();      // set capacity to the current size
         temp.quickSortFromTo(0, temp.size()-1);   // sort list in increasing order, simplify the next processings
         elements = temp.elements();

         int j = 0;
         int l = 0;
View Full Code Here

   public int add (DoubleArrayList data)  {
      XYSeries serie = new XYSeries(" ");
      DoubleArrayList temp = data.copy()// deep copy
      XYSeriesCollection tempSeriesCollection = (XYSeriesCollection) seriesCollection;

      temp.trimToSize();      // set capacity to the current size
      temp.quickSortFromTo(0, temp.size()-1);   // sort list in increasing order, simplify the next processings
      double[] elements = temp.elements();

      int count = 0;
      int j = 0;
View Full Code Here

    double[][] scheduleDeviationsArrays = new double[numOfTraces][];

    for (int traceIndex = 0; traceIndex < numOfTraces; traceIndex++) {
      DoubleArrayList list = scheduleDeviations.get(traceIndex);
      list.trimToSize();
      scheduleDeviationsArrays[traceIndex] = list.elements();
    }

    return new ScheduleDeviationHistory(tripId, scheduleTimesArray,
        scheduleDeviationsArrays);
View Full Code Here

    DoubleArrayList vs = new DoubleArrayList();
    for (double v : values) {
      if (!Double.isNaN(v))
        vs.add(v);
    }
    vs.trimToSize();
    return vs.elements();
  }

  private ScheduleDeviationHistogram createHistogramFromValues(double[] values,
      int stepSizeInSeconds) {
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.