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

Examples of net.fec.openrq.util.linearalgebra.io.ByteVectorIterator


    }

    @Override
    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()));
        }
    }
View Full Code Here


    }

    @Override
    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()));
        }
    }
View Full Code Here

    }

    @Override
    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()));
        }
    }
View Full Code Here

    }

    @Override
    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()));
        }
    }
View Full Code Here

    }

    @Override
    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

    }

    @Override
    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

    public void addRowsInPlace(int srcRow, int destRow) {

        Indexables.checkIndexBounds(srcRow, rows());
        Indexables.checkIndexBounds(destRow, rows());

        ByteVectorIterator srcIt = rowIterator(srcRow);
        ByteVectorIterator destIt = rowIterator(destRow);
        while (srcIt.hasNext()) { // && destIt.hasNext()
            srcIt.next();
            destIt.next();
            destIt.set(aPlusB(srcIt.get(), destIt.get()));
        }
    }
View Full Code Here

        Indexables.checkIndexBounds(srcRow, rows());
        Indexables.checkIndexBounds(destRow, rows());
        Indexables.checkFromToBounds(fromColumn, toColumn, columns());

        ByteVectorIterator srcIt = rowIterator(srcRow, fromColumn, toColumn);
        ByteVectorIterator destIt = rowIterator(destRow, fromColumn, toColumn);
        while (srcIt.hasNext()) { // && destIt.hasNext()
            srcIt.next();
            destIt.next();
            destIt.set(aPlusB(srcIt.get(), destIt.get()));
        }
    }
View Full Code Here

            }
            else {
                Indexables.checkIndexBounds(srcRow, rows());
                Indexables.checkIndexBounds(destRow, rows());

                ByteVectorIterator srcIt = rowIterator(srcRow);
                ByteVectorIterator destIt = rowIterator(destRow);
                while (srcIt.hasNext()) { // && destIt.hasNext()
                    srcIt.next();
                    destIt.next();
                    final byte prod = aTimesB(srcMultiplier, srcIt.get());
                    destIt.set(aPlusB(prod, destIt.get()));
                }
            }
        }
    }
View Full Code Here

            else {
                Indexables.checkIndexBounds(srcRow, rows());
                Indexables.checkIndexBounds(destRow, rows());
                Indexables.checkFromToBounds(fromColumn, toColumn, columns());

                ByteVectorIterator srcIt = rowIterator(srcRow, fromColumn, toColumn);
                ByteVectorIterator destIt = rowIterator(destRow, fromColumn, toColumn);
                while (srcIt.hasNext()) { // && destIt.hasNext()
                    srcIt.next();
                    destIt.next();
                    final byte prod = aTimesB(srcMultiplier, srcIt.get());
                    destIt.set(aPlusB(prod, destIt.get()));
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of net.fec.openrq.util.linearalgebra.io.ByteVectorIterator

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.