|
Boost : |
From: boost (boost_at_[hidden])
Date: 2001-12-11 10:52:24
Salut,
On Tuesday 11 December 2001 11:14, you wrote:
> > > 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 ?
>
> No, (efficient) reshape could be an option for matrix types, which
> use an 1-D array as storage.
>
Then I don't understand, why capacity1()/capacity2() is non-generic,
since I'm not allowed to make use of capacity() in a sense, that I
reshape the matrix, so capacity() is useless and we have
capacity1()/capacity2() only.
Best wishes,
Peter
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk