public static DMatrixRMaj extractRow ( DMatrixRMaj a , int row , DMatrixRMaj out ) { if ( out == null ) out = new DMatrixRMaj ( 1 , a . numCols ) ; else if ( ! MatrixFeatures_DDRM . isVector ( out ) || out . getNumElements ( ) != a . numCols ) throw new MatrixDimensionException ( "Output must be a vector of length " + a . numCols ) ; System . arraycopy ( a . data , a . getIndex ( row , 0 ) , out . data , 0 , a . numCols ) ; return out ; }
Extracts the row from a matrix .