8 var,
std::move(dict)){SYMENGINE_ASSIGN_TYPEID()
9 SYMENGINE_ASSERT(is_canonical(get_poly()))}
13 hash_t seed = SYMENGINE_UEXPRPOLY;
15 seed += get_var()->hash();
16 for (
const auto &it : get_poly().dict_) {
17 hash_t temp = SYMENGINE_UEXPRPOLY;
18 hash_combine<unsigned int>(temp, it.first);
19 hash_combine<Basic>(temp, *(it.second.get_basic()));
27 Expression curr = get_poly().get_dict().begin()->second;
28 for (
const auto &it : get_poly().get_dict())
29 if (curr.
get_basic()->__cmp__(*it.second.get_basic()))
37 for (
const auto &p : get_poly().get_dict()) {
40 ans += p.second * temp;
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;
const RCP< const Basic > & get_basic() const
Method to get Basic from Expression.
hash_t __hash__() const override
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.