Example usage for org.apache.commons.collections.primitives ArrayDoubleList ArrayDoubleList

List of usage examples for org.apache.commons.collections.primitives ArrayDoubleList ArrayDoubleList

Introduction

In this page you can find the example usage for org.apache.commons.collections.primitives ArrayDoubleList ArrayDoubleList.

Prototype

public ArrayDoubleList(double[] array) 

Source Link

Document

Constructs a list by copying the specified array.

Usage

From source file:de.unibayreuth.bayeos.goat.table.MassenTableModel.java

private void removeRows(int[] r) {
    ByteList stat = new ArrayByteList(r.length);
    IntList von = new ArrayIntList(r.length);
    DoubleList wert = new ArrayDoubleList(r.length);

    for (int i = 0; i < r.length; i++) {
        stat.add(statusList.get(r[i]));/*w  w w. j av a  2s  .  co m*/
        von.add(vonList.get(r[i]));
        wert.add(wertList.get(r[i]));
    }
    statusList.removeAll(stat);
    vonList.removeAll(von);
    wertList.removeAll(wert);
}

From source file:de.unibayreuth.bayeos.goat.table.MassenTableModel.java

public boolean load(ObjektNode objekt, TimeFilter tFilter, StatusFilter sFilter) {
    try {/*from w  w w .  ja  v  a 2  s.  co m*/

        Vector params = new Vector();
        params.add(objekt.getId());
        params.add(tFilter.getVector());
        params.add(sFilter.getVector());
        Vector vReturn = (Vector) xmlClient.execute("MassenTableHandler.getRows", params);
        // Rows als byte[]
        byte[] ba = (byte[]) vReturn.elementAt(1);

        statusList = new ArrayByteList(ba.length / rowLength);
        vonList = new ArrayIntList(ba.length / rowLength);
        wertList = new ArrayDoubleList(ba.length / rowLength);

        ByteBuffer b = ByteBuffer.wrap(ba);
        while (b.hasRemaining()) {
            vonList.add(b.getInt());
            wertList.add((double) b.getFloat());
            statusList.add(b.get());
        }
        vReturn = null;
        logger.debug("MassenTableModel filled with " + getRowCount() + " records.");
        return true;
    } catch (XmlRpcException e) {
        MsgBox.error(e.getMessage());
        return false;
    }
}

From source file:org.jactr.core.utils.references.DefaultReferences.java

public DefaultReferences(int optimization) {
    setOptimizationLevel(optimization);
    _arrayOfDoubles = new ArrayDoubleList(Math.min(getOptimizationLevel(), 10));
}