|
Boost : |
From: jhrwalter (walter_at_[hidden])
Date: 2001-12-08 07:23:50
--- In boost_at_y..., Toon Knapen <toon.knapen_at_s...> wrote:
> Peter Schmitteckert (boost) wrote:
[snip]
> 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`. But maybe that is what you meant Joerg (and I
just
> did not get your point).
matrix_range could do the job. But I don't know your application for
matrix reallocations. Let's take some examples: if I'd have to
implement LU-factorization in LAPACK style, I'd use matrix_range as a
view on the sub matrices of the matrix to factorize. If I'd need
Fortan like workspace, I'd eventually discuss size()/capacity().
matrix_range is well suited to address a sub matrix of an existing
matrix. But one has to consider carefully, what code a compiler emits
with this additional indirection, AFAIK.
Regards
Joerg
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk