11 #ifndef INDEX_INLINES_H
12 #define INDEX_INLINES_H
71 else if ( (l>f) ^ (s<0) ) {
88 BaseFirst( b.BaseFirst ),
98 BaseFirst(b->BaseFirst),
164 return Index(1,off,i);
169 return Index(1,off,i);
174 return Index(1,-off,i);
179 return Index(-1,off,i);
184 return Index(-1,0,i);
244 return (
min()<=
a.max())&&(
max()>=
a.min());
250 return (
min()<=
a.min())&&(
max()>=
a.max());
270 bool quicktest = (a0 <= b0 && a1 >= b1);
271 if (!quicktest || s == 1)
279 return (t % s == 0) && ((b0-
a0) % s == 0) && ((a1-b1) % s == 0);
324 #define INDEX_PETE_DOUBLE_OPERATOR(OP,APP) \
327 PETE_TBTree< APP , Index::PETE_Expr_t , PETE_Scalar<double> > \
328 OP ( const Index& idx, double x ) \
331 PETE_TBTree< APP , Index::PETE_Expr_t , PETE_Scalar<double> > \
333 return Return_t( idx.MakeExpression(), PETE_Scalar<double>(x) ); \
337 PETE_TBTree< APP , PETE_Scalar<double> , Index::PETE_Expr_t > \
338 OP ( double x , const Index& idx ) \
341 PETE_TBTree< APP , PETE_Scalar<double> , Index::PETE_Expr_t > \
343 return Return_t( PETE_Scalar<double>(x) , idx.MakeExpression()); \
362 #undef INDEX_PETE_DOUBLE_OPERATOR
366 #define INDEX_PETE_FLOAT_OPERATOR(OP,APP) \
369 PETE_TBTree< APP , Index::PETE_Expr_t , PETE_Scalar<float> > \
370 OP ( const Index& idx, float x ) \
373 PETE_TBTree< APP , Index::PETE_Expr_t , PETE_Scalar<float> > \
375 return Return_t( idx.MakeExpression(), PETE_Scalar<float>(x) ); \
379 PETE_TBTree< APP , PETE_Scalar<float> , Index::PETE_Expr_t > \
380 OP ( float x , const Index& idx ) \
383 PETE_TBTree< APP , PETE_Scalar<float> , Index::PETE_Expr_t > \
385 return Return_t( PETE_Scalar<float>(x) , idx.MakeExpression()); \
404 #undef INDEX_PETE_FLOAT_OPERATOR
408 #define INDEX_PETE_INT_OPERATOR(OP,APP) \
411 PETE_TBTree< APP , Index::PETE_Expr_t , PETE_Scalar<int> > \
412 OP ( const Index& idx, int x ) \
415 PETE_TBTree< APP , Index::PETE_Expr_t , PETE_Scalar<int> > \
417 return Return_t( idx.MakeExpression(), PETE_Scalar<int>(x) ); \
421 PETE_TBTree< APP , PETE_Scalar<int> , Index::PETE_Expr_t > \
422 OP ( int x , const Index& idx ) \
425 PETE_TBTree< APP , PETE_Scalar<int> , Index::PETE_Expr_t > \
427 return Return_t( PETE_Scalar<int>(x) , idx.MakeExpression()); \
442 #undef INDEX_PETE_INT_OPERATOR
PETE_TBTree< OpEQ, Index::PETE_Expr_t, PETE_Scalar< double > > eq(const Index &idx, double x)
#define INDEX_PETE_DOUBLE_OPERATOR(OP, APP)
PETE_TBTree< OpLT, Index::PETE_Expr_t, PETE_Scalar< double > > lt(const Index &idx, double x)
Index operator*(const Index &i, int m)
Index operator-(const Index &i, int off)
#define INDEX_PETE_INT_OPERATOR(OP, APP)
#define INDEX_PETE_FLOAT_OPERATOR(OP, APP)
PETE_TBTree< OpLE, Index::PETE_Expr_t, PETE_Scalar< double > > le(const Index &idx, double x)
PETE_TBTree< FnMin, Index::PETE_Expr_t, PETE_Scalar< double > > Min(const Index &idx, double x)
PETE_TBTree< OpNE, Index::PETE_Expr_t, PETE_Scalar< double > > ne(const Index &idx, double x)
PETE_TBTree< OpGE, Index::PETE_Expr_t, PETE_Scalar< double > > ge(const Index &idx, double x)
PETE_TBTree< OpGT, Index::PETE_Expr_t, PETE_Scalar< double > > gt(const Index &idx, double x)
Index operator+(const Index &i, int off)
PETE_TBTree< FnMax, Index::PETE_Expr_t, PETE_Scalar< double > > Max(const Index &idx, double x)
Index operator/(const Index &i, int d)
constexpr double a0
Bohr radius in m.
bool split(Index &l, Index &r) const
bool containsAllPoints(const Index &b) const
Index plugBase(const Index &) const
bool contains(const Index &a) const
bool touches(const Index &a) const
bool sameBase(const Index &) const
unsigned int length() const