Boost logo

Boost :

From: jhrwalter (walter_at_[hidden])
Date: 2001-12-08 07:30:27


--- In boost_at_y..., Toon Knapen <toon.knapen_at_s...> wrote:
> Peter Schmitteckert (boost) wrote:
>
> > Salut,
> >
> > On Friday 07 December 2001 13:37, Toon Knapen wrote:
> >
> >>Peter Schmitteckert (boost) wrote:
> >>
> >>>Allthough a submatrix adapter would be sufficient for me.
> >>>
> >>Do you mean that you would first create a matrix of sufficient
size,
> >>then take a submatrix and resizing the latter does not need
reallocation
> >>as long as the size of the submatrix is not bigger as the size of
the
> >>original matrix. That would indeed cover the `quest for a minimal
number
> >>of reallocations`.
> >>
> >
> > Yes, but I think a submatrix should not be allowed to resized
larger than
> > the original matrix.
>
>
> Agreed. But what should happen if the users tries it anyway : throw
an
> exception ? But isn't testing for this too time-consuming as the
> intention is exactly to have quickly a matrix with the correct size
> without losing time for allocating a new one.
 
Our general strategy in ublas is, to test such conditions in debug
mode and to disable these checks in release mode.
 
Regards
 
Joerg
 


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