Examples of ByteVector


Examples of net.fec.openrq.util.linearalgebra.vector.ByteVector

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

        ByteVector result = factory.createVector(toColumn - fromColumn);

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

        return result;
    }
View Full Code Here

Examples of net.fec.openrq.util.linearalgebra.vector.ByteVector

    public ByteVector getColumn(int j, Factory factory) {

        Indexables.checkIndexBounds(j, columns());
        ensureFactoryIsNotNull(factory);

        ByteVector result = factory.createVector(rows);

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

        return result;
    }
View Full Code Here

Examples of net.fec.openrq.util.linearalgebra.vector.ByteVector

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

        ByteVector result = factory.createVector(toRow - fromRow);

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

        return result;
    }
View Full Code Here

Examples of net.fec.openrq.util.linearalgebra.vector.ByteVector

        Indexables.checkIndexBounds(i, rows());
        Indexables.checkIndexBounds(j, rows());

        if (i != j) {
            ByteVector ii = getRow(i);
            ByteVector jj = getRow(j);

            setRow(i, jj);
            setRow(j, ii);
        }
    }
View Full Code Here

Examples of net.fec.openrq.util.linearalgebra.vector.ByteVector

        Indexables.checkIndexBounds(i, columns());
        Indexables.checkIndexBounds(j, columns());

        if (i != j) {
            ByteVector ii = getColumn(i);
            ByteVector jj = getColumn(j);

            setColumn(i, jj);
            setColumn(j, ii);
        }
    }
View Full Code Here

Examples of net.fec.openrq.util.linearalgebra.vector.ByteVector

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

        ByteVector result = factory.createVector(rows);

        for (int i = 0; i < rows; i++) {
            byte acc = 0;
            for (int j = 0; j < columns; j++) {
                final byte prod = aTimesB(safeGet(i, j), vector.get(j));
                acc = aPlusB(acc, prod);
            }

            if (acc != 0) {
                result.set(i, acc);
            }
        }

        return result;
    }
View Full Code Here

Examples of net.fec.openrq.util.linearalgebra.vector.ByteVector

        if (columns != matrix.rows()) {
            fail("Wrong matrix dimensions: " + matrix.rows() + "x" + matrix.columns() +
                 ". Should be: " + columns + "x_.");
        }

        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);
        }

        return result;
    }
View Full Code Here

Examples of net.fec.openrq.util.linearalgebra.vector.ByteVector

        if ((toColumn - fromColumn) != matrix.rows()) {
            fail("Wrong matrix dimensions: " + matrix.rows() + "x" + matrix.columns() +
                 ". Should be: " + (toColumn - fromColumn) + "x_.");
        }

        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);
        }

        return result;
    }
View Full Code Here

Examples of net.rim.device.api.util.ByteVector

                cacheItemObj = cacheItemStore.getContents( codeSigningKey );
            } catch ( ControlledAccessException ignore ) {
                // cacheItemObj remains null
            }
            if( cacheItemObj instanceof ByteVector ) {
                ByteVector cacheItemVector = (ByteVector) cacheItemObj;
                data = cacheItemVector.getArray();
            }
        }

        if( data != null ) {
            // Create InputStream
View Full Code Here

Examples of net.sf.cglib.asm.ByteVector

    return localRuntimeInvisibleAnnotations;
  }

  protected ByteVector write(ClassWriter paramClassWriter, byte[] paramArrayOfByte, int paramInt1, int paramInt2, int paramInt3)
  {
    return Annotation.writeAnnotations(new ByteVector(), this.annotations, paramClassWriter);
  }
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.