14 using Cf =
typename BaseType<Container, Poly>::coef_type;
15 using Key =
typename Container::key_type;
22 int compare(
const Basic &
o)
const
27 if (this->get_poly().size() != s.get_poly().size())
28 return (this->get_poly().size() < s.get_poly().size()) ? -1 : 1;
37 bool is_canonical(
const Container &dict)
const
40 for (
auto iter : dict.dict_)
52 static Container container_from_dict(
const RCP<const Basic> &var,
58 template <
typename FromPoly>
62 return Poly::from_container(p.get_var(),
66 Cf eval(
const Cf &x)
const
68 Key
last_deg = this->get_poly().dict_.rbegin()->first;
71 for (
auto it = this->get_poly().dict_.rbegin();
72 it != this->get_poly().dict_.rend(); ++
it) {
85 return this->get_poly().dict_;
88 inline Cf get_coeff(Key x)
const
90 return this->get_poly().get_coeff(x);
95 iterator begin()
const
97 return this->get_poly().dict_.
begin();
101 return this->get_poly().dict_.end();
103 r_iterator obegin()
const
105 return this->get_poly().dict_.rbegin();
107 r_iterator oend()
const
109 return this->get_poly().dict_.rend();
114 if (this->get_poly().dict_.empty())
116 return this->get_degree() + 1;