58 virtual void print(std::ostream &str,
int precedence = 99)
const;
75 template <
class T>
inline
78 lft(rhs.lft->clone()), rgt(rhs.rgt->clone())
82 template <
class T>
inline
88 template <
class T>
inline
93 template <
class T>
inline
99 template <
class T>
inline
101 std::vector<T> op1 = lft->evaluate();
102 int op2 = int(std::round(rgt->evaluate()));
104 if(op2 <= 0 ||
static_cast<unsigned>(op2) > op1.size()) {
105 throw CLRangeError(
"Expressions::Indexer()",
"Index out of range.");
112 template <
class T>
inline
Representation objects and parsers for attribute expressions.
A pointer to an array expression.
A scalar expression to retrieve an indexed component from an array.
virtual Scalar< T > * clone() const
Make clone.
virtual void print(std::ostream &str, int precedence=99) const
Print expression.
void operator=(const Indexer &)
virtual T evaluate() const
Evaluate.
PtrToScalar< double > rgt