predicates to the STL:
@example
-class ex_is_less : public std::binary_function<ex, ex, bool> @{
+class ex_is_less @{
public:
bool operator()(const ex &lh, const ex &rh) const;
@};
-class ex_is_equal : public std::binary_function<ex, ex, bool> @{
+class ex_is_equal @{
public:
bool operator()(const ex &lh, const ex &rh) const;
@};
// count the number of expressions equal to '1'
unsigned num_ones = std::count_if(v.begin(), v.end(),
- std::bind2nd(ex_is_equal(), 1));
+ [](const ex& e) @{ return ex_is_equal()(e, 1); @});
@end example
The implementation of @code{ex_is_less} uses the member function
To evaluate them using floating-point arithmetic you need to call
@example
-ex ex::evalf(int level = 0) const;
+ex ex::evalf() const;
@end example
@cindex @code{Digits}
@example
bool info(unsigned inf) const override;
-ex evalf(int level = 0) const override;
+ex evalf() const override;
ex series(const relational & r, int order, unsigned options = 0) const override;
ex derivative(const symbol & s) const override;
@end example