Boost logo

Boost Users :

From: Stephen Crowley (stephenc_at_[hidden])
Date: 2002-11-28 03:16:14


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. 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.

-- 
Stephen

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net