Package cern.colt.list

Examples of cern.colt.list.ObjectArrayList


    /**
     * Constructor
     */
    protected AbstractCalendar() {
        this.addedHolidays = new ObjectArrayList();
    }
View Full Code Here


* Removes all (key,value) associations from the receiver.
* Implicitly calls <tt>trimToSize()</tt>.
*/
public void clear() {
  new ByteArrayList(this.state).fillFromToWith(0, this.state.length-1, FREE);
     new ObjectArrayList(values).fillFromToWith(0, state.length-1, null); // delta

  this.distinct = 0;
  this.freeEntries = table.length; // delta
  trimToSize();
}
View Full Code Here

* <tt>keys = (8,7,6), values = (1,2,2) --> keyList = (8,6,7)</tt>
*
* @param keyList the list to be filled, can have any size.
*/
public void keysSortedByValue(final LongArrayList keyList) {
  pairsSortedByValue(keyList, new ObjectArrayList(size()));
}
View Full Code Here

* This method can be used to iterate over the values of the receiver.
*
* @return the values.
*/
public ObjectArrayList values() {
  ObjectArrayList list = new ObjectArrayList(size());
  values(list);
  return list;
}
View Full Code Here

public Object clone() {
  DoubleQuantileEstimator copy = (DoubleQuantileEstimator) super.clone();
  if (this.bufferSet != null) {
    copy.bufferSet = (DoubleBufferSet) copy.bufferSet.clone();
    if (this.currentBufferToFill != null) {
       int index = new ObjectArrayList(this.bufferSet.buffers).indexOf(this.currentBufferToFill, true);
       copy.currentBufferToFill = copy.bufferSet.buffers[index];
    }   
  }
  return copy;
}
View Full Code Here

}
/**
* To do. This could faster be done without sorting (min and second min).
*/
protected static void sortAscendingByLevel(DoubleBuffer[] fullBuffers) {
  new ObjectArrayList(fullBuffers).quickSortFromTo(0,fullBuffers.length-1,
    new java.util.Comparator() {
      public int compare(Object o1, Object o2) {
        int l1 = ((DoubleBuffer) o1).level();
        int l2 = ((DoubleBuffer) o2).level();
        return l1<l2? -1: l1==l2? 0: +1;
View Full Code Here

*/
public ObjectBuffer(ObjectBufferConsumer target, int capacity) {
  this.target = target;
  this.capacity = capacity;
  this.elements = new Object[capacity];
  this.list = new ObjectArrayList(elements);
  this.size = 0;
}
View Full Code Here

* <tt>keys = (8,7,6), values = (1,2,2) --> keyList = (8,6,7)</tt>
*
* @param keyList the list to be filled, can have any size.
*/
public void keysSortedByValue(final IntArrayList keyList) {
  pairsSortedByValue(keyList, new ObjectArrayList(size()));
}
View Full Code Here

* This method can be used to iterate over the values of the receiver.
*
* @return the values.
*/
public ObjectArrayList values() {
  ObjectArrayList list = new ObjectArrayList(size());
  values(list);
  return list;
}
View Full Code Here

* Removes all (key,value) associations from the receiver.
* Implicitly calls <tt>trimToSize()</tt>.
*/
public void clear() {
  new ByteArrayList(this.state).fillFromToWith(0, this.state.length-1, FREE);
     new ObjectArrayList(values).fillFromToWith(0, state.length-1, null); // delta

  this.distinct = 0;
  this.freeEntries = table.length; // delta
  trimToSize();
}
View Full Code Here

TOP

Related Classes of cern.colt.list.ObjectArrayList

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.