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 ? toon