|
Boost Users : |
Subject: Re: [Boost-users] Can I delete/resize a multi_array??
From: alfC (alfredo.correa_at_[hidden])
Date: 2011-02-28 13:48:03
On Feb 28, 9:28 am, Ramon F Herrera <ra..._at_[hidden]> wrote:
> On 2/28/2011 11:22 AM, Ramon F Herrera wrote:
>
>
>
> > On 2/28/2011 10:53 AM, Jeff Flinn wrote:
> >> Do you mean different dimensionality? The dimensionality is part of the
> >> type and determined at compile time. Different dimensionality requires a
> >> different type.
>
> No. All my multi_arrays are tables of 2 dimensions.
you can always resize
m.resize(extents[n1][n2])
the problem with that is that it won't necessarily "erase" the old
data. You can erase the data manually after that.
Or alternatively you can first resize to 0, 0 and then to the final
size:
m.resize(extents[0][0]);
m.resize(extents[n1][n2]);
in which case the data is always probably reallocated.
Hope it is useful.
Alfredo
>
> -RFH
>
> _______________________________________________
> Boost-users mailing list
> Boost-us..._at_[hidden]http://lists.boost.org/mailman/listinfo.cgi/boost-users
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