39 template <
class T,
class U>
55 virtual std::vector<T>
evaluate()
const;
58 virtual void print(std::ostream &,
int precedence = 99)
const;
77 template <
class T,
class U>
inline
79 AList<
T>(), fun(rhs.fun), opr(rhs.opr->clone())
83 template <
class T,
class U>
inline
89 template <
class T,
class U>
inline
94 template <
class T,
class U>
inline
100 template <
class T,
class U>
inline
103 std::vector<U>
arg = opr->evaluate();
104 std::vector<T> result;
106 for(
typename std::vector<U>::size_type i = 0; i <
arg.size(); ++i) {
107 result.push_back((*fun.function)(
arg[i]));
127 template <
class T,
class U>
inline
129 if(fun.precedence >= 0) {
130 if(fun.precedence <= precedence) os <<
"(";
132 opr->print(os, fun.precedence);
133 if(fun.precedence <= precedence) os <<
")";
135 os << fun.name <<
"(";
py::list function(PolynomialPatch *patch, py::list point)
Representation objects and parsers for attribute expressions.
boost::variant< nil, bool, unsigned int, double, identifier, boost::recursive_wrapper< unary >, boost::recursive_wrapper< function_call >, boost::recursive_wrapper< expression > > operand
An array expression defined by a list of scalar expressions.
An array expression with one array operand.
virtual void print(std::ostream &, int precedence=99) const
Print expression.
const TFunction1< T, U > & fun
void operator=(const AUnary &)
virtual std::vector< T > evaluate() const
Evaluate.
virtual OArray< T > * clone() const
Make clone.
A function of one U, returning a T.