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

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


    public void updateRow(int i, MatrixFunction function, int fromColumn, int toColumn) {

        ByteVectorIterator it = rowIterator(i, fromColumn, toColumn);
        while (it.hasNext()) {
            it.next();
            it.set(function.evaluate(i, it.index(), it.get()));
        }
    }

    @Override
    public void updateColumn(int j, MatrixFunction function) {
View Full Code Here


    public void updateColumn(int j, MatrixFunction function) {

        ByteVectorIterator it = columnIterator(j);
        while (it.hasNext()) {
            it.next();
            it.set(function.evaluate(it.index(), j, it.get()));
        }
    }

    @Override
    public void updateColumn(int j, MatrixFunction function, int fromRow, int toRow) {
View Full Code Here

    public void updateColumn(int j, MatrixFunction function, int fromRow, int toRow) {

        ByteVectorIterator it = columnIterator(j, fromRow, toRow);
        while (it.hasNext()) {
            it.next();
            it.set(function.evaluate(it.index(), j, it.get()));
        }
    }

    @Override
    public void updateNonZero(MatrixFunction function) {
View Full Code Here

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

    public void updateNonZeroInRow(int i, MatrixFunction function) {

        ByteVectorIterator it = nonZeroRowIterator(i);
        while (it.hasNext()) {
            it.next();
            it.set(function.evaluate(i, it.index(), it.get()));
        }
    }

    @Override
    public void updateNonZeroInRow(int i, MatrixFunction function, int fromColumn, int toColumn) {
View Full Code Here

    public void updateNonZeroInRow(int i, MatrixFunction function, int fromColumn, int toColumn) {

        ByteVectorIterator it = nonZeroRowIterator(i, fromColumn, toColumn);
        while (it.hasNext()) {
            it.next();
            it.set(function.evaluate(i, it.index(), it.get()));
        }
    }

    @Override
    public void updateNonZeroInColumn(int j, MatrixFunction function) {
View Full Code Here

    public void updateNonZeroInColumn(int j, MatrixFunction function) {

        ByteVectorIterator it = nonZeroColumnIterator(j);
        while (it.hasNext()) {
            it.next();
            it.set(function.evaluate(it.index(), j, it.get()));
        }
    }

    @Override
    public void updateNonZeroInColumn(int j, MatrixFunction function, int fromRow, int toRow) {
View Full Code Here

    public void updateNonZeroInColumn(int j, MatrixFunction function, int fromRow, int toRow) {

        ByteVectorIterator it = nonZeroColumnIterator(j, fromRow, toRow);
        while (it.hasNext()) {
            it.next();
            it.set(function.evaluate(it.index(), j, it.get()));
        }
    }

    @Override
    public byte fold(MatrixAccumulator accumulator) {
View Full Code Here

    public byte foldRow(int i, MatrixAccumulator accumulator) {

        ByteVectorIterator it = rowIterator(i);
        while (it.hasNext()) {
            it.next();
            accumulator.update(i, it.index(), it.get());
        }

        return accumulator.accumulate();
    }
View Full Code Here

    public byte foldColumn(int j, MatrixAccumulator accumulator) {

        ByteVectorIterator it = columnIterator(j);
        while (it.hasNext()) {
            it.next();
            accumulator.update(it.index(), j, it.get());
        }

        return accumulator.accumulate();
    }
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.