Examples of ByteVectorIterator


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

        if (columns != row.length()) {
            fail("Wrong vector length: " + row.length() + ". Should be: " + columns + ".");
        }

        ByteVectorIterator newIt = row.iterator();
        ByteVectorIterator oldIt = rowIterator(i);
        while (newIt.hasNext()) { // && oldIt.hasNext()
            newIt.next();
            oldIt.next();
            oldIt.set(newIt.get());
        }
    }
View Full Code Here

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

        Indexables.checkIndexBounds(i, rows());
        Indexables.checkOffsetLengthBounds(fromColumn, length, columns());
        Indexables.checkOffsetLengthBounds(fromIndex, length, row.length());

        ByteVectorIterator newIt = row.iterator(fromIndex, fromIndex + length);
        ByteVectorIterator oldIt = rowIterator(i, fromColumn, fromColumn + length);
        while (newIt.hasNext()) { // && oldIt.hasNext()
            newIt.next();
            oldIt.next();
            oldIt.set(newIt.get());
        }
    }
View Full Code Here

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

        if (rows != column.length()) {
            fail("Wrong vector length: " + column.length() + ". Should be: " + rows + ".");
        }

        ByteVectorIterator newIt = column.iterator();
        ByteVectorIterator oldIt = columnIterator(j);
        while (newIt.hasNext()) { // && oldIt.hasNext()
            newIt.next();
            oldIt.next();
            oldIt.set(newIt.get());
        }
    }
View Full Code Here

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

        Indexables.checkIndexBounds(j, columns());
        Indexables.checkOffsetLengthBounds(fromRow, length, rows());
        Indexables.checkOffsetLengthBounds(fromIndex, length, column.length());

        ByteVectorIterator newIt = column.iterator(fromIndex, fromIndex + length);
        ByteVectorIterator oldIt = columnIterator(j, fromRow, fromRow + length);
        while (newIt.hasNext()) { // && oldIt.hasNext()
            newIt.next();
            oldIt.next();
            oldIt.set(newIt.get());
        }
    }
View Full Code Here

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

        ByteVector result = factory.createVector(matrix.columns());

        for (int j = 0; j < matrix.columns(); j++) {
            byte acc = 0;

            ByteVectorIterator it = rowIterator(i);
            while (it.hasNext()) {
                it.next();
                final byte prod = aTimesB(it.get(), matrix.get(it.index(), j));
                acc = aPlusB(acc, prod);
            }

            result.set(j, acc);
        }
View Full Code Here

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

        ByteVector result = factory.createVector(matrix.columns());

        for (int j = 0; j < matrix.columns(); j++) {
            byte acc = 0;

            ByteVectorIterator it = rowIterator(i, fromColumn, toColumn);
            while (it.hasNext()) {
                it.next();
                final byte prod = aTimesB(it.get(), matrix.get(it.index() - fromColumn, j));
                acc = aPlusB(acc, prod);
            }

            result.set(j, acc);
        }
View Full Code Here

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

    public void divideRowInPlace(int i, byte value) {

        Indexables.checkIndexBounds(i, rows());

        if (value != 1) {
            ByteVectorIterator it = rowIterator(i);
            while (it.hasNext()) {
                it.next();
                it.set(aDividedByB(it.get(), value));
            }
        }
    }
View Full Code Here

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

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

        if (value != 1) {
            ByteVectorIterator it = rowIterator(i, fromColumn, toColumn);
            while (it.hasNext()) {
                it.next();
                it.set(aDividedByB(it.get(), value));
            }
        }
    }
View Full Code Here

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

    public void divideColumnInPlace(int j, byte value) {

        Indexables.checkIndexBounds(j, columns());

        if (value != 1) {
            ByteVectorIterator it = columnIterator(j);
            while (it.hasNext()) {
                it.next();
                it.set(aDividedByB(it.get(), value));
            }
        }
    }
View Full Code Here

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

        Indexables.checkIndexBounds(j, columns());
        Indexables.checkFromToBounds(fromRow, toRow, rows());

        if (value != 1) {
            ByteVectorIterator it = columnIterator(j, fromRow, toRow);
            while (it.hasNext()) {
                it.next();
                it.set(aDividedByB(it.get(), value));
            }
        }
    }
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.