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;
112 #ifdef IPPL_USE_MEMBER_TEMPLATES
141 for ( d = 0 ; d <
Dim ; ++d )
149 for ( d = 0 ; d <
Dim ; ++d )
160 template <
unsigned Dim>
165 for (
unsigned d=0; d<
Dim; d++) newNdi[d] = ndi[d] + off[d];
168 template <
unsigned Dim>
173 for (
unsigned d=0; d<
Dim; d++) newNdi[d] = off[d] + ndi[d];
176 template <
unsigned Dim>
181 for (
unsigned d=0; d<
Dim; d++) newNdi[d] = ndi[d] - off[d];
184 template <
unsigned Dim>
189 for (
unsigned d=0; d<
Dim; d++) newNdi[d] = off[d] - ndi[d];
194 template <
unsigned Dim>
199 for (
unsigned d=0; d<
Dim; d++) newNdi[d] = -ndi[d];
202 template <
unsigned Dim>
207 for (
unsigned d=0; d<
Dim; d++) newNdi[d] = ndi[d] * mult[d];
210 template <
unsigned Dim>
215 for (
unsigned d=0; d<
Dim; d++) newNdi[d] = mult[d] * ndi[d];
218 template <
unsigned Dim>
223 for (
unsigned d=0; d<
Dim; d++) newNdi[d] = ndi[d]/denom[d];
229 template <
unsigned Dim>
232 for (
unsigned d=0; d<
Dim; ++d) {
233 if (lhs[d] < rhs[d])
return true;
234 if ( !(lhs[d]==rhs[d]) )
return false;
239 template <
unsigned Dim,
unsigned Dim2>
245 for (
unsigned d=0; d<
Dim; ++d)
246 if ( !(lhs[d]==rhs[d]) )
return false;
252 template <
unsigned Dim>
254 operator<<(std::ostream& out, const NDIndex<Dim>& idx) {
257 for (d = 0; d <
Dim; ++d)
258 out << idx[d] << ((d==Dim-1) ?
'}' :
',');
269 template<
unsigned Dim>
280 template<
unsigned Dim>
291 template<
unsigned Dim>
306 #ifndef NDINDEX_INLINES_H
bool split(NDIndex< Dim > &l, NDIndex< Dim > &r, unsigned d, double a) const
Matrix< T > operator+(const Matrix< T > &, const Matrix< T > &)
Matrix addition.
bool containsAllPoints(const NDIndex< Dim > &b) const
Matrix< T > operator/(const Matrix< T > &, const T &)
Matrix divided by scalar.
Index & operator[](unsigned d)
Message & getMessage(Message &m)
Matrix< T > operator*(const Matrix< T > &, const Matrix< T > &)
Matrix multiply.
NDIndex< D1 > plugBase(const NDIndex< D1 > &, const NDIndex< D2 > &)
const Index & operator[](unsigned d) const
NDIndex< Dim > plugBase(const NDIndex< 1 > &i) const
static bool test(const NDIndex< Dim > &a, const NDIndex< Dim > &b)
bool touches(const NDIndex< Dim > &) const
NDIndex< Dim > plugBase(const NDIndex< 2 > &i) const
static bool test(NDIndex< Dim > &l, NDIndex< Dim > &r, const NDIndex< Dim > &a)
NDIndex< Dim > plugBase(const NDIndex< 7 > &i) const
NDIndex< Dim > plugBase(const NDIndex< 6 > &i) const
bool contains(const NDIndex< Dim > &a) const
NDIndex< Dim > plugBase(const NDIndex< 4 > &i) const
NDIndex< Dim > intersect(const NDIndex< Dim > &) const
NDIndex< Dim > plugBase(const NDIndex< 5 > &i) const
Message & putMessage(Message &m) const
Matrix< T > operator-(const Matrix< T > &, const Matrix< T > &)
Matrix subtraction.
NDIndex< Dim > plugBase(const NDIndex< 3 > &i) const
static bool test(const NDIndex< Dim > &a, const NDIndex< Dim > &b)
bool operator==(const TwoPolynomial &left, const TwoPolynomial &right)