Examples of CCSByteMatrix


Examples of net.fec.openrq.util.linearalgebra.matrix.sparse.CCSByteMatrix

            throw new IllegalArgumentException("Sides of blocks are incompatible!");
        }

        final int rows = a.rows() + c.rows();
        final int cols = a.columns() + b.columns();
        ByteMatrix matrix = new CCSByteMatrix(rows, cols);
        for (int i = 0; i < rows; i++) {
            for (int j = 0; j < cols; j++) {
                if ((i < a.rows()) && (j < a.columns())) {
                    matrix.set(i, j, a.get(i, j));
                }
                if ((i < a.rows()) && (j > a.columns())) {
                    matrix.set(i, j, b.get(i, j));
                }
                if ((i > a.rows()) && (j < a.columns())) {
                    matrix.set(i, j, c.get(i, j));
                }
                if ((i > a.rows()) && (j > a.columns())) {
                    matrix.set(i, j, d.get(i, j));
                }
            }
        }

        return matrix;
View Full Code Here

Examples of net.fec.openrq.util.linearalgebra.matrix.sparse.CCSByteMatrix

    @Override
    public ByteMatrix createDiagonalMatrix(byte[] diagonal) {

        final int size = diagonal.length;

        ByteMatrix matrix = new CCSByteMatrix(size, size);
        for (int i = 0; i < size; i++) {
            matrix.set(i, i, diagonal[i]);
        }

        return matrix;
    }
View Full Code Here

Examples of net.fec.openrq.util.linearalgebra.matrix.sparse.CCSByteMatrix

                rowInds[i][j] = Serialization.readMatrixRowIndex(buffer);
                rowVals[i][j] = Serialization.readMatrixValue(buffer);
            }
        }

        return new CCSByteMatrix(rows, cols, rowVals, rowInds, colCards);
    }
View Full Code Here

Examples of net.fec.openrq.util.linearalgebra.matrix.sparse.CCSByteMatrix

                rowInds[i][j] = Serialization.readMatrixRowIndex(ch);
                rowVals[i][j] = Serialization.readMatrixValue(ch);
            }
        }

        return new CCSByteMatrix(rows, cols, rowVals, rowInds, colCards);
    }
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.