11 #ifndef SEQUENCE_GEN_H
12 #define SEQUENCE_GEN_H
42 #define RNG_OPERATOR_WITH_SCALAR(GEN,SCA,OP,APP) \
44 inline PETEBinaryReturn<GEN,SCA,APP>::type \
45 OP(const GEN& lhs, SCA sca) \
47 return PETE_apply( APP(), lhs(), sca ); \
50 inline PETEBinaryReturn<SCA,GEN,APP>::type \
51 OP(SCA sca, const GEN& rhs) \
53 return PETE_apply( APP(), sca, rhs() ); \
56 #define RNG_OPERATOR(GEN,OP,APP) \
58 RNG_OPERATOR_WITH_SCALAR(GEN,short,OP,APP) \
59 RNG_OPERATOR_WITH_SCALAR(GEN,int,OP,APP) \
60 RNG_OPERATOR_WITH_SCALAR(GEN,long,OP,APP) \
61 RNG_OPERATOR_WITH_SCALAR(GEN,float,OP,APP) \
62 RNG_OPERATOR_WITH_SCALAR(GEN,double,OP,APP) \
63 RNG_OPERATOR_WITH_SCALAR(GEN,std::complex<double>,OP,APP)
65 #define RNG_BASIC_MATH(GEN) \
67 RNG_OPERATOR(GEN,operator+,OpAdd) \
68 RNG_OPERATOR(GEN,operator-,OpSubtract) \
69 RNG_OPERATOR(GEN,operator*,OpMultipply) \
70 RNG_OPERATOR(GEN,operator/,OpDivide)
const GT & getGenerator() const
SequenceGen< GT > PETE_Expr_t
GT::Return_t PETE_Return_t
SequenceGen(const GT &gen)
Return_t operator()(void) const
const PETE_Expr_t & MakeExpression() const
PETE_Expr_t & MakeExpression()