ublas::matrix sharing storage with ublas::vector

27 Nov
2002
27 Nov
'02
3:10 a.m.
It is possible for a vector and a matrix to share the same storage, as long as the dimensions agree? Some of the algorithms I am implementing require some objects to be treated as an arbitrarily sized matrix, and sometimes as a vector, and it would be convient to have a matrix and a vector share the same memory. -- Stephen

27 Nov
27 Nov
8:53 a.m.
New subject: [Boost-Users] ublas::matrix sharing storage with ublas::vector
On Wednesday 27 November 2002 04:10, Stephen Crowley wrote:
I suppose you want to treat one particular row or column of the matrix as a vector. You can do for instance : matrix< double > m(10,10) ; matrix_row< matrix< double > > row(m,0) ; // first row of matrix m
8184
Age (days ago)
8184
Last active (days ago)
1 comments
2 participants
participants (2)
-
Stephen Crowley
-
Toon Knapen