Examples of DoubleArrayList


Examples of cern.colt.list.DoubleArrayList

/**
* Returns a string representation of the receiver, containing
* the String representation of each key-value pair, sorted ascending by value.
*/
public String toStringByValue() {
  DoubleArrayList theKeys = new DoubleArrayList();
  keysSortedByValue(theKeys);

  StringBuffer buf = new StringBuffer();
  buf.append("[");
  int maxIndex = theKeys.size() - 1;
  for (int i = 0; i <= maxIndex; i++) {
    double key = theKeys.get(i);
      buf.append(String.valueOf(key));
    buf.append("->");
      buf.append(String.valueOf(get(key)));
    if (i < maxIndex) buf.append(", ");
  }
View Full Code Here

Examples of cern.colt.list.DoubleArrayList

* Each percentage must be in the interval <tt>[0.0,1.0]</tt>.
* @return the quantiles.
*/
public static DoubleArrayList quantiles(DoubleArrayList sortedData, DoubleArrayList percentages) {
  int s = percentages.size();
  DoubleArrayList quantiles = new DoubleArrayList(s);
 
  for (int i=0; i < s; i++) {
    quantiles.add(quantile(sortedData, percentages.get(i)));
  }
 
  return quantiles;
}
View Full Code Here

Examples of cern.colt.list.DoubleArrayList

  // assertion: data is sorted ascending.
  // assertion: splitValues is sorted ascending.
  int noOfBins = splitters.size() + 1;
 
  DoubleArrayList[] bins = new DoubleArrayList[noOfBins];
  for (int i=noOfBins; --i >= 0;) bins[i] = new DoubleArrayList();
 
  int listSize = sortedList.size();
  int nextStart = 0;
  int i=0;
  while (nextStart < listSize && i < noOfBins-1) {
View Full Code Here

Examples of cern.colt.list.DoubleArrayList

public DoubleBuffer2D(DoubleBuffer2DConsumer target, int capacity) {
  this.target = target;
  this.capacity = capacity;
  this.xElements = new double[capacity];
  this.yElements = new double[capacity];
  this.xList = new DoubleArrayList(xElements);
  this.yList = new DoubleArrayList(yElements);
  this.size = 0;
}
View Full Code Here

Examples of cern.colt.list.DoubleArrayList

*/
public DoubleBuffer(DoubleBufferConsumer target, int capacity) {
  this.target = target;
  this.capacity = capacity;
  this.elements = new double[capacity];
  this.list = new DoubleArrayList(elements);
  this.size = 0;
}
View Full Code Here

Examples of com.carrotsearch.hppc.DoubleArrayList

  public void populateWeights()
  {
    int i, size = s_values.size();
    b_weight = true;
   
    d_weights = new DoubleArrayList();

    for (i=0; i<size; i++)
      d_weights.add(1d);
  }
View Full Code Here

Examples of com.gs.collections.impl.list.mutable.primitive.DoubleArrayList

        return !predicate.accept(this.value1);
    }

    public ImmutableDoubleCollection select(DoublePredicate predicate)
    {
        return predicate.accept(this.value1) ? DoubleArrayList.newListWith(this.value1).toImmutable() : new DoubleArrayList().toImmutable();
    }
View Full Code Here

Examples of it.unimi.dsi.fastutil.doubles.DoubleArrayList

  public DocumentIteratorBuilderVisitor( final Object2ReferenceMap<String,Index> indexMap, final Reference2ReferenceMap<Index,Object> index2Parser, final Index defaultIndex, final int limit ) {
    this.indexMap = indexMap;
    this.defaultIndex = defaultIndex;
    this.index2Parser = index2Parser;
    this.limit = limit;
    weights = new DoubleArrayList();
    weight = Double.NaN;
    curr = new ObjectArrayList<Index>();
    curr.push( defaultIndex );
    this.numberOfDocuments = defaultIndex.numberOfDocuments;
  }
View Full Code Here

Examples of jmt.engine.math.DoubleArrayList

   * @param quantile Requested quantiles
   */
  public QuantileDataAnalyzer(double alfa, double precision, int maxData, double[] quantile) {
    super(alfa, precision, maxData);
    this.quantile = quantile;
    data = new DoubleArrayList(1024);
    data.add(0);
    sorter = new HeapSort();
  }
View Full Code Here

Examples of jodd.util.collection.DoubleArrayList

    }

    if (value instanceof Iterable) {
      Iterable iterable = (Iterable) value;

      DoubleArrayList doubleArrayList = new DoubleArrayList();

      for (Object element : iterable) {
        double convertedValue = convertType(element);
        doubleArrayList.add(convertedValue);
            }

      return doubleArrayList.toArray();
    }

    if (value instanceof CharSequence) {
      String[] strings = StringUtil.splitc(value.toString(), ArrayConverter.NUMBER_DELIMITERS);
      return convertArrayToArray(strings);
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.