|
Re: ublas::matrix sharing storage with ublas::vecto r: msg#00318lib.boost.user
Stephen Crowley wrote: > On Thu, Nov 28, 2002 at 09:12:53AM -0500, Toon Knapen wrote: > > On Wednesday 27 November 2002 20: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). > > > > OK, So as to get to the bottom of this. Do you really want to perform vector > > operations on a vector that consists of a concatenation of all rows (or > > columns) of the matrix do you want to get access to the storage to pass your > > information to another library. > > > > The latter case is dealt with in the boost-sandbox/boost/numeric/bindings. > > There we've spend effort to be able to extract the begin- and end-pointer > > (not iterator) from any vector or matrix. (In the bindings it's used to pass > > these pointers to e.g. BLAS) > > > > In the former case, could you enlighten me what kind of numeric operations > > you're dealing with ? > > The matrix I am working with is a set of weights for a neural net. I am > using a kalman filtering library > (http://www.acfr.usyd.edu.au/technology/bayesianfilter/Bayes++.htm) that > treats the weights as a vector. This looks more like a conceptual than an integration problem. Maybe Bayes++ should support a corresponding matrix signature, too? OTOH it seems valid to look at the vector space of linear operators. If this is a recurring use case, we should consider to add new proxy classes matrix_as_vector<> (and vector_as_matrix<>) to uBLAS. > So, I'm not really sure how to answer your > question. I guess I would say that I need to access a vector as a > concatenation of the rows or columns of the matirx (for this purpose it > does not matter as long as it is consistent). However, copying undering data() > member is working for now, although not as quickly as I would like. I'm not sure if this (or array_adaptor) should be the final solution. Regards Joerg ------------------------ 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::vector: 00318, jhr . walter |
|---|---|
| Next by Date: | RE: MSVC++, bind and namespaces: 00318, Antoine Boivin Filion |
| Previous by Thread: | Re: ublas::matrix sharing storage with ublas::vecto ri: 00318, Stephen Crowley |
| Next by Thread: | Re: ublas::matrix sharing storage with ublas::vector: 00318, Kresimir Fresl |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |