Package net.fec.openrq.util.linearalgebra.io

Examples of net.fec.openrq.util.linearalgebra.io.ByteVectorIterator.index()


        for (int i = 0; i < rows(); i++) {
            Serialization.writeMatrixRowCardinality(buffer, nonZerosInRow(i));
            ByteVectorIterator it = nonZeroRowIterator(i);
            while (it.hasNext()) {
                it.next();
                Serialization.writeMatrixColumnIndex(buffer, it.index());
                Serialization.writeMatrixValue(buffer, it.get());
            }
        }

        buffer.rewind();
View Full Code Here


        for (int j = 0; j < columns(); j++) {
            ByteVectorIterator it = nonZeroColumnIterator(j);
            while (it.hasNext()) {
                it.next();
                result.set(j, it.index(), it.get());
            }
        }

        return result;
    }
View Full Code Here

        for (int j = 0; j < columns(); j++) {
            ByteVectorIterator it = columnIterator(j);
            while (it.hasNext()) {
                it.next();
                procedure.apply(it.index(), j, it.get());
            }
        }
    }

    @Override
View Full Code Here

        for (int j = 0; j < columns(); j++) {
            ByteVectorIterator it = nonZeroColumnIterator(j);
            while (it.hasNext()) {
                it.next();
                procedure.apply(it.index(), j, it.get());
            }
        }
    }

    @Override
View Full Code Here

        for (int j = 0; j < columns(); j++) {
            ByteVectorIterator it = nonZeroColumnIterator(j);
            while (it.hasNext()) {
                it.next();
                it.set(function.evaluate(it.index(), j, it.get()));
            }
        }
    }

    @Override
View Full Code Here

        for (int i = 0; i < columns(); i++) {
            Serialization.writeMatrixRowCardinality(buffer, nonZerosInColumn(i));
            ByteVectorIterator it = nonZeroColumnIterator(i);
            while (it.hasNext()) {
                it.next();
                Serialization.writeMatrixRowIndex(buffer, it.index());
                Serialization.writeMatrixValue(buffer, it.get());
            }
        }

        buffer.rewind();
View Full Code Here

        for (int i = 0; i < columns(); i++) {
            Serialization.writeMatrixRowCardinality(ch, nonZerosInColumn(i));
            ByteVectorIterator it = nonZeroColumnIterator(i);
            while (it.hasNext()) {
                it.next();
                Serialization.writeMatrixRowIndex(ch, it.index());
                Serialization.writeMatrixValue(ch, it.get());
            }
        }
    }
View Full Code Here

    public void each(VectorProcedure procedure, int fromIndex, int toIndex) {

        ByteVectorIterator it = iterator(fromIndex, toIndex);
        while (it.hasNext()) {
            it.next();
            procedure.apply(it.index(), it.get());
        }
    }

    @Override
    public void eachNonZero(VectorProcedure procedure) {
View Full Code Here

    public void eachNonZero(VectorProcedure procedure) {

        ByteVectorIterator it = nonZeroIterator();
        while (it.hasNext()) {
            it.next();
            procedure.apply(it.index(), it.get());
        }
    }

    @Override
    public void eachNonZero(VectorProcedure procedure, int fromIndex, int toIndex) {
View Full Code Here

    public void eachNonZero(VectorProcedure procedure, int fromIndex, int toIndex) {

        ByteVectorIterator it = nonZeroIterator(fromIndex, toIndex);
        while (it.hasNext()) {
            it.next();
            procedure.apply(it.index(), it.get());
        }
    }

    @Override
    public void update(int i, VectorFunction function) {
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.