8 var,
std::move(dict)){SYMENGINE_ASSIGN_TYPEID()
9 SYMENGINE_ASSERT(is_canonical(get_poly()))}
11 hash_t UExprPoly::__hash__()
const
15 seed += get_var()->hash();
16 for (
const auto &
it : get_poly().dict_) {
25Expression UExprPoly::max_coef()
const
27 Expression
curr = get_poly().get_dict().begin()->second;
28 for (
const auto &
it : get_poly().get_dict())
37 for (
const auto &p : get_poly().get_dict()) {
47 return get_poly().empty();
52 return get_poly().size() == 1
and get_poly().get_dict().begin()->second == 1
53 and get_poly().get_dict().begin()->first == 0;
58 return get_poly().size() == 1
59 and get_poly().get_dict().begin()->second == -1
60 and get_poly().get_dict().begin()->first == 0;
65 if (get_poly().empty())
67 return get_poly().size() == 1
and get_poly().get_dict().begin()->first == 0;
72 return get_poly().size() == 1
and get_poly().get_dict().begin()->first == 1
73 and get_poly().get_dict().begin()->second == 1;
78 return get_poly().size() == 1
and get_poly().get_dict().begin()->first != 0
79 and get_poly().get_dict().begin()->second != 1
80 and get_poly().get_dict().begin()->second != 0;
85 return get_poly().size() == 1
and get_poly().get_dict().begin()->second == 1
86 and get_poly().get_dict().begin()->first != 1
87 and get_poly().get_dict().begin()->first != 0;
bool is_minus_one() const
UExprPoly(const RCP< const Basic > &var, UExprDict &&dict)
Constructor of UExprPoly class.
Expression eval(const Expression &x) const
Evaluates the UExprPoly at value x.
Main namespace for SymEngine package.
void hash_combine(hash_t &seed, const T &v)