Boost logo

Boost :

From: Kevlin Henney (kevlin_at_[hidden])
Date: 2000-12-02 10:31:22


In message <9098m5+8qj0_at_[hidden]>, Giovanni Bavestrelli
<gibav_at_[hidden]> writes
>> 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?

Yes, I mean the first dimension. It would not really be a case of
treating it differently. Following on from Jeremy's point about having
iterators per dimension, this would certainly fit in: end() - begin()
for any dimension would also equal size() for that dimension. I
mentioned the base dimension as that is your immediate point of contact
with the array and, in terms of resizing, it would also be the only
dimension to which this would be appropriate.

>> 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.

And, if the concept above were relevant, it would indeed make sense.

Just food for thought.

Kevlin
____________________________________________________________

  Kevlin Henney phone: +44 117 942 2990
  Curbralan Limited mobile: +44 7801 073 508
  mailto:kevlin_at_[hidden] 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