Boost logo

Boost :

From: boost (boost_at_[hidden])
Date: 2001-12-10 16:06:46


SAlut,

On Saturday 08 December 2001 13:18, you wrote:

> Ok, I was too lazy last time ;-). I should have mentioned that
> constructors and resize members of vector and matrix containers
> usually only allocate the space to store data, they do not initialize
> their elements (should they?).
No they shoud not.

> In this sense they behave like
> std::vector's reserve().

> Matrix containers can be organized in different ways: as a container
> of containers (e.g. vector<vector<> >) or as an mapping to an 1-D
> storage container (e.g. matrix (i, j) == vector (i * size2 + j)).
>
> In the former case we should define capacity1()/capacity2() to return
> the number of allocated rows/columns, in the latter we should define
> capacity() to return the number of allocated elements in the 1-D
> storage container.
So, matrix_range<matrix<T> > allows for reshaping, not just
creating sub-matrix views ?

Peter


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk