Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#37 RectDomain and Range::all()

open
nobody
None
5
2012-01-17
2012-01-17
Sylwester Arabas
No

Apparently the RectDomain does not work with Range::all():

# include <blitz/array.h>
using namespace blitz;
int main()
{
Array<float, 2> arr(2,2);
arr = 1,2,3,4;
Range rng_x = Range::all();
Range rng_y = Range(1,1);
RectDomain<2> sdm = RectDomain<2>(TinyVector<Range,2>(rng_x, rng_y));
cout << "arr(rng_x, rng_y) = " << arr(rng_x, rng_y) << endl;
cout << "arr(RectDomain(rng_x, rng_y)) = " << arr(sdm) << endl;
}

outputs:

arr(rng_x, rng_y) = (0,1) x (0,0)
[ 2
4 ]

arr(RectDomain(rng_x, rng_y)) = (0,0) x (0,0)
[ 2 ]

HTH, Best regards,
Sylwester

Discussion