|
Re: ublas::matrix sharing storage with ublas::vector: msg#00297lib.boost.user
On Wednesday 27 November 2002 04:10, Stephen Crowley wrote: > 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. 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 ------------------------ Yahoo! Groups Sponsor ---------------------~--> Get 128 Bit SSL Encryption! http://us.click.yahoo.com/CBxunD/vN2EAA/xGHJAA/EbFolB/TM ---------------------------------------------------------------------~-> Info: <http://www.boost.org> Wiki: <http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl> Unsubscribe: <mailto:boost-users-unsubscribe@xxxxxxxxxxxxxxx> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | ublas::matrix sharing storage with ublas::vector: 00297, Stephen Crowley |
|---|---|
| Next by Date: | Re: Is intrusive_ptr the thing to use?: 00297, Peter Dimov |
| Previous by Thread: | ublas::matrix sharing storage with ublas::vectori: 00297, Stephen Crowley |
| Next by Thread: | RE: ublas::matrix sharing storage with ublas::vecto r: 00297, Scott Sinclair |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |