// get the row vector vector< double > Matrix::getRow( int row ) const { gsl_vector* v = gsl_vector_alloc( nCols() ); gsl_matrix_get_row( v, data, row ); //qcheng75 vector<double> ret=gsl2vector( v, 0); gsl_vector_free(v); return ret; //return gsl2vector( v ); }
// get the column vector vector< double > Matrix::getCol( int col ) const { gsl_vector* v = gsl_vector_alloc( nRows() ); gsl_matrix_get_col( v, data, col ); return gsl2vector( v ); }
// get the row vector vector< double > Matrix::getRow( int row ) const { gsl_vector* v = gsl_vector_alloc( nCols() ); gsl_matrix_get_row( v, data, row ); return gsl2vector( v ); }