Logo Search packages:      
Sourcecode: jblas version File versions  Download package

static DoubleMatrix org::jblas::la::DoubleMatrix::concatHorizontally ( DoubleMatrix  A,
DoubleMatrix  B 
) [inline, static]

Concatenates two matrices horizontally. Matrices must have identical numbers of rows.

Definition at line 483 of file DoubleMatrix.java.

References columns, data, DoubleMatrix(), length, and rows.

        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);
        return result;

Generated by  Doxygen 1.6.0   Back to index