Boost logo

Boost Users :

From: Scott Sinclair (scott.sinclair_at_[hidden])
Date: 2002-11-27 01:31:37


Hi Stephen

Yes, just use a (1, n) or (n, 1) matrix as appropriate and do matrix
operations instead of vector ops. The results will be correct as long as you
make sure you have a correctly dimensioned matrix in place of your vector
(i.e one that matches your vectors size and orientation). After all a matrix
is just a collection of vectors ;-)

cheers,
Scott

On 27/11/2002 05: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.
>
> --
> 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.


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