Line | |
---|
1 | #ifndef BZ_RANGE_CC |
---|
2 | #define BZ_RANGE_CC |
---|
3 | |
---|
4 | |
---|
5 | #include <blitz/range.h> |
---|
6 | #include <blitz/array/ops.h> |
---|
7 | |
---|
8 | BZ_NAMESPACE(blitz) |
---|
9 | |
---|
10 | |
---|
11 | inline Range::T_numtype Range::operator[](int i) const |
---|
12 | { |
---|
13 | return first_ + i * stride_; |
---|
14 | } |
---|
15 | |
---|
16 | inline RectDomain<Range::rank_> Range::domain() const |
---|
17 | { |
---|
18 | return RectDomain<rank_>(TinyVector<int,1>(0), |
---|
19 | TinyVector<int,1>(ubound(0))); |
---|
20 | } |
---|
21 | |
---|
22 | inline bool Range::assertInRange(const T_index& BZ_DEBUG_PARAM(index)) const |
---|
23 | { |
---|
24 | BZPRECHECK((index[0]<=ubound(0)) && (index[0]>=0), |
---|
25 | "Range index out of range: " << index[0] |
---|
26 | << endl << "Lower bounds: 0" << endl |
---|
27 | << "Length: " << length() << endl); |
---|
28 | return true; |
---|
29 | } |
---|
30 | |
---|
31 | BZ_NAMESPACE_END |
---|
32 | |
---|
33 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.