|
RE: ublas::matrix sharing storage with ublas::vecto r: msg#00309lib.boost.user
Sorry, I obviously misunderstood your original question :( On 28/11/2002 03:46 Stephen Crowley wrote: > What do you mean by "just use it as" ? > For example.. I have a matrix<double> m(5,5); > > In some code I actually need to use it as a 5x5 matrix.. but > other parts > must reference it as a vector (to pass to another library). > > Currently I am doing something like this > > matrix<double> m(5,5); > // do stuff to m > vector<double> v(25); > v.data() = m.data(); > // pass v to library > // get results back > m.data() = v.data(); > > This is obviously not optimal.. and if both m.data() and > v.data() pointed to > the same location in memory the problem would be solved. > > I suppose I might be able to get around it by making my own > storage class > that allows you to specify a location and size instead of > allocating one > itself. > > --Stephen The contents of this email may be confidential. Unauthorised use is prohibited. Umgeni Water does not accept liability for any statements and opinions which are the sender's own view and not expressly made on its behalf. ------------------------ 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: | Re: ublas::matrix sharing storage with ublas::vecto r: 00309, Stephen Crowley |
|---|---|
| Next by Date: | Re: ublas::matrix sharing storage with ublas::vecto r: 00309, Toon Knapen |
| Previous by Thread: | Using function_traitsi: 00309, Marshall Clow |
| Next by Thread: | Re: ublas::matrix sharing storage with ublas::vecto r: 00309, Toon Knapen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |