|
typedef Container | container_type |
|
typedef Container::coef_type | coef_type |
|
|
static RCP< const Poly > | from_container (const set_basic &vars, Container &&d) |
|
template<typename FromPoly > |
static enable_if_t< is_a_UPoly< FromPoly >::value, RCP< const Poly > > | from_poly (const FromPoly &p) |
|
static RCP< const Poly > | from_dict (const vec_basic &v, typename Container::dict_type &&d) |
|
static Container | container_from_dict (const set_basic &s, typename Container::dict_type &&d) |
|
static RCP< const Basic > | loads (const std::string &) |
| Creates an instance of a serialized string.
|
|
template<typename Container, typename Poly>
class SymEngine::MSymEnginePoly< Container, Poly >
Definition at line 313 of file msymenginepoly.h.
◆ __eq__()
template<typename Container , typename Poly >
Test equality.
A virtual function for testing the equality of two Basic
objects
- Deprecated:
- Use eq(const Basic &a, const Basic &b) non-member method
- Parameters
-
o | a constant reference to object to test against |
- Returns
- True if
this
is equal to o
Implements SymEngine::Basic.
Definition at line 410 of file msymenginepoly.h.
413 if (not is_a<Poly>(o))
415 const Poly &o_ = down_cast<const Poly &>(o);
417 if (1 == poly_.dict_.size() && 1 == o_.poly_.dict_.size()) {
418 if (poly_.dict_.begin()->second != o_.poly_.dict_.begin()->second)
420 if (poly_.dict_.begin()->first == o_.poly_.dict_.begin()->first
421 && unified_eq(vars_, o_.vars_))
423 typename Container::vec_type v1, v2;
424 v1.resize(vars_.
size(), 0);
425 v2.resize(o_.vars_.size(), 0);
426 if (poly_.dict_.begin()->first == v1
427 || o_.poly_.dict_.begin()->first == v2)
430 }
else if (0 == poly_.dict_.size() && 0 == o_.poly_.dict_.size()) {
433 return (unified_eq(vars_, o_.vars_)
434 && unified_eq(poly_.dict_, o_.poly_.dict_));
◆ compare()
template<typename Container , typename Poly >
Returns -1, 0, 1 for this < o, this == o, this > o
. This method is used when you want to sort things like x+y+z
into canonical order. This function assumes that o
is the same type as this
. Use __cmp__
if you want general comparison.
Implements SymEngine::Basic.
Definition at line 333 of file msymenginepoly.h.
335 SYMENGINE_ASSERT(is_a<Poly>(o))
337 const Poly &s = down_cast<const Poly &>(o);
339 if (vars_.
size() != s.vars_.size())
340 return vars_.
size() < s.vars_.size() ? -1 : 1;
341 if (poly_.dict_.size() != s.poly_.dict_.size())
342 return poly_.dict_.size() < s.poly_.dict_.size() ? -1 : 1;
int unified_compare(const T &a, const T &b)
The documentation for this class was generated from the following file: