Boost logo

Boost :

From: Jeremy Siek (jsiek_at_[hidden])
Date: 2001-04-01 15:44:35


On Sun, 1 Apr 2001, Toon Knapen wrote:
toon> Isn't that confusing. And mathematically there's a hugh difference
toon> between operations where the result has the same dimension or
toon> a lower dimension. Why would we make they be identical then
toon> in C++ syntax ?

Well, its not identical syntax, but similar:

assume A is 3 dimensional

A[3 <= stride(1) < 7][2][0 <= stride(1) < 10]
  gives you a 2 dimensional array

A[3 <= stride(2) < 7][all][0 <= stride(1) < 10]
  gives you a 3 dimensional array

At least to me, the above syntax is quite clear.
Now, according to Blitz terminology, the 1st thing is a slice
and the 2nd thing is a subarray. However, in the docs for
operator[] I'd rather just say that the thing returned is
a subarray.

toon> I was just wondering if anyone really needs negative indices. If not,
toon> indices get often compared to e.g. the size of a vector which is
toon> size_t and thus generates a warning comparing signed and unsigned
toon> integers.

That is certainly a good concern. I'd like to keep this as an open
question.

Cheers,
Jeremy

----------------------------------------------------------------------
 Jeremy Siek www: http://www.lsc.nd.edu/~jsiek/
 Ph.D. Candidate email: jsiek_at_[hidden]
 Univ. of Notre Dame work phone: (219) 631-3906
----------------------------------------------------------------------


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