Package cern.colt.list

Examples of cern.colt.list.ObjectArrayList


public class RomanovSKTFormulaReader implements IFormulaReader
{
    public ITabularFormula readFormula(InputStream input) throws IOException
    {
        ObjectArrayList cts = new ObjectArrayList();
       
        SimpleFormula formula = new SimpleFormula();
       
        while (true)
        {
            int a = Helper.readInt(input);
           
            if (a == Integer.MAX_VALUE)
            {
                break;
            }
           
            int b = Helper.readInt(input);
            int c = Helper.readInt(input);
           
            if (a == 0 && b == 0 && c == 0)
            {
                cts.add(formula);
                formula = new SimpleFormula();
            }
            else
            {
                formula.add(new SimpleTriplet(a, b, c));
            }
        }
       
        formula = new SimpleFormula();
       
        for (int k = 0; k < cts.size(); k++)
        {
            ITabularFormula f = (ITabularFormula) cts.get(k);
            for (int j = 0; j < f.getTiers().size(); j++)
            {
                ITier tier = f.getTier(j);
                tier.inverse();
                if (!tier.isEmpty())
View Full Code Here


    }

    public synchronized void close() {
        idPoolsLock.writeLock().lock();
        try {
            ObjectArrayList pools = idPools.values();
            for (int i = 0; i < pools.size(); i++) {
                ((PartitionPool) pools.get(i)).close();
            }
            idPools.clear();
        } finally {
            idPoolsLock.writeLock().unlock();
        }
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

* <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

* 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.