|
Boost : |
From: Giovanni Bavestrelli (gibav_at_[hidden])
Date: 2000-12-01 17:28:21
--- In boost_at_[hidden], Kevlin Henney <kevlin_at_c...> wrote:
> In message <903j1b+g56r_at_e...>, Giovanni Bavestrelli <giovanni.bav
> estrelli_at_i...> writes
> >Array<int,3> A3(ArraySizes(10)(20)(30)); // 3D Array of ints
>
> One area of possible improvement that I felt when reading the
article
> originally was in this area. Although I recognise there is no
obvious
> syntax, I am not enamoured of this one. What about <<? Or how about
> something quite different:
>
> X(10) + X(20) + X(30)
>
I responded to this in a previous message.
> Where X is an appropriate but short name we haven't yet thought of
that
> indicates dimension :->
>
> In thinking about the whole dimension and sizing issue, I was
wondering
> about the following classification:
>
> size_type is the size_type in a given dimension
> resize resizes the base dimension wrt size_type
> size returns the length of the base dimension
>
The base dimension or the total dimension? If by base dimension you
mean the first dimension, why should it be treated differently?
> shape_type is the type that holds the size for each
dimension
> reshape resizes all of the dimensions
> shape returns the sizes of all the dimensions
>
This looks nice, but does not seem necessary if you don't define the
concept above.
> This seems in the spirit of the STL.
>
> Thoughts?
>
> Kevlin
Thanks,
Giovanni
> ____________________________________________________________
>
> Kevlin Henney phone: +44 117 942 2990
> Curbralan Limited mobile: +44 7801 073 508
> mailto:kevlin_at_c... fax: +44 870 052 2289
> http://www.curbralan.com
> ____________________________________________________________
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk