20 template <
unsigned Dim>
class NDIndex;
22 template <
unsigned Dim>
24 template <
unsigned Dim>
27 template <
unsigned Dim>
29 template <
unsigned Dim>
32 template <
unsigned Dim>
35 template <
unsigned Dim>
37 template <
unsigned Dim>
40 template <
unsigned Dim>
43 template <
unsigned Dim>
44 bool operator<(const NDIndex<Dim>&,
const NDIndex<Dim>&);
46 template <
unsigned Dim,
unsigned Dim2>
49 template <
unsigned Dim>
50 std::ostream& operator<<(std::ostream&, const NDIndex<Dim>&);
59 template<
unsigned D1,
unsigned D2>
72 template<
unsigned Dim>
107 unsigned size()
const;
132 for ( d = 0 ; d <
Dim ; ++d )
140 for ( d = 0 ; d <
Dim ; ++d )
151 template <
unsigned Dim>
156 for (
unsigned d=0; d<
Dim; d++) newNdi[d] = ndi[d] + off[d];
159 template <
unsigned Dim>
164 for (
unsigned d=0; d<
Dim; d++) newNdi[d] = off[d] + ndi[d];
167 template <
unsigned Dim>
172 for (
unsigned d=0; d<
Dim; d++) newNdi[d] = ndi[d] - off[d];
175 template <
unsigned Dim>
180 for (
unsigned d=0; d<
Dim; d++) newNdi[d] = off[d] - ndi[d];
185 template <
unsigned Dim>
190 for (
unsigned d=0; d<
Dim; d++) newNdi[d] = -ndi[d];
193 template <
unsigned Dim>
198 for (
unsigned d=0; d<
Dim; d++) newNdi[d] = ndi[d] * mult[d];
201 template <
unsigned Dim>
206 for (
unsigned d=0; d<
Dim; d++) newNdi[d] = mult[d] * ndi[d];
209 template <
unsigned Dim>
214 for (
unsigned d=0; d<
Dim; d++) newNdi[d] = ndi[d]/denom[d];
220 template <
unsigned Dim>
223 for (
unsigned d=0; d<
Dim; ++d) {
224 if (lhs[d] < rhs[d])
return true;
225 if ( !(lhs[d]==rhs[d]) )
return false;
230 template <
unsigned Dim,
unsigned Dim2>
236 for (
unsigned d=0; d<
Dim; ++d)
237 if ( !(lhs[d]==rhs[d]) )
return false;
243 template <
unsigned Dim>
245 operator<<(std::ostream& out, const NDIndex<Dim>& idx) {
248 for (d = 0; d <
Dim; ++d)
249 out << idx[d] << ((d==Dim-1) ?
'}' :
',');
260 template<
unsigned Dim>
271 template<
unsigned Dim>
282 template<
unsigned Dim>
297 #ifndef NDINDEX_INLINES_H
Message & putMessage(Message &m) const
bool containsAllPoints(const NDIndex< Dim > &b) const
bool touches(const NDIndex< Dim > &) const
static bool test(const NDIndex< Dim > &a, const NDIndex< Dim > &b)
Matrix< T > operator-(const Matrix< T > &, const Matrix< T > &)
Matrix subtraction.
NDIndex< Dim > plugBase(const NDIndex< D > &i) const
NDIndex< Dim > intersect(const NDIndex< Dim > &) const
bool operator==(const TwoPolynomial &left, const TwoPolynomial &right)
Matrix< T > operator*(const Matrix< T > &, const Matrix< T > &)
Matrix multiply.
NDIndex< D1 > plugBase(const NDIndex< D1 > &, const NDIndex< D2 > &)
static bool test(NDIndex< Dim > &l, NDIndex< Dim > &r, const NDIndex< Dim > &a)
bool contains(const NDIndex< Dim > &a) const
const Index & operator[](unsigned d) const
Matrix< T > operator+(const Matrix< T > &, const Matrix< T > &)
Matrix addition.
bool split(NDIndex< Dim > &l, NDIndex< Dim > &r, unsigned d, double a) const
static bool test(const NDIndex< Dim > &a, const NDIndex< Dim > &b)
Message & getMessage(Message &m)
Matrix< T > operator/(const Matrix< T > &, const T &)
Matrix divided by scalar.
Index & operator[](unsigned d)