* Concatenates two matrices horizontally. Matrices must have identical
* numbers of rows.
*/
public static DoubleMatrix concatHorizontally(DoubleMatrix A, DoubleMatrix B) {
if (A.rows != B.rows) {
throw new SizeException("Matrices don't have same number of rows.");
}
DoubleMatrix result = new DoubleMatrix(A.rows, A.columns + B.columns);
SimpleBlas.copy(A, result);
JavaBlas.rcopy(B.length, B.data, 0, 1, result.data, A.length, 1);