List of usage examples for org.apache.commons.math3.linear BlockRealMatrix getRowVector
@Override public RealVector getRowVector(final int row) throws OutOfRangeException
From source file:gamlss.utilities.MatrixFunctions.java
/** * Append rows of the matrices.//from w w w .j a va 2 s .co m * @param m1 - first matrix * @param m2 - second matrix * @return m1.append.m2 */ public static BlockRealMatrix appendMatricesRows(final BlockRealMatrix m1, final BlockRealMatrix m2) { BlockRealMatrix out = new BlockRealMatrix(m1.getRowDimension(), m1.getColumnDimension() + m2.getColumnDimension()); for (int i = 0; i < m1.getRowDimension(); i++) { out.setRowVector(i, m1.getRowVector(i).append(m2.getRowVector(i))); } return out; }