one useful way is to use a matrix_indirect object in which with another integer matrix you can specifiy each row and column that you need.
Hi,I have a NxM matrix and I would like to extract some rows / columns. I have try to use the matrix_slice command, but I need specify only the rows / columns and need the full range for columns / rows:For illustrating (not syntactic correct):unsigned int rows[5];// dynamic fill rows[i]
ublas::matrix_slice< ublas::matrix<double> > extract(mymatrix, ublas::slice(rows), ublas::range(0, mymatrix::size2()-1));// createublas::matrix<double> newmatrix = extract;How can I create a new matrix with the full row / column range from some columns / rows?ThanksPhil
_______________________________________________
ublas mailing list
ublas@lists.boost.org
http://lists.boost.org/mailman/listinfo.cgi/ublas
Sent to: david.bellot@gmail.com