|
|
typedef Container | container_type |
| |
|
typedef Container::coef_type | coef_type |
| |
|
|
| MSymEnginePoly (const set_basic &vars, Container &&dict) |
| |
| int | compare (const Basic &o) const override |
| |
|
vec_basic | get_args () const override |
| | Returns the list of arguments.
|
| |
|
const Container & | get_poly () const |
| |
|
const set_basic & | get_vars () const |
| |
| bool | __eq__ (const Basic &o) const override |
| | Test equality. More...
|
| |
|
TypeID | get_type_code () const |
| |
|
| Basic () |
| | Constructor.
|
| |
|
| Basic (const Basic &)=delete |
| | Delete the copy constructor and assignment.
|
| |
|
Basic & | operator= (const Basic &)=delete |
| | Assignment operator in continuation with above.
|
| |
|
| Basic (Basic &&)=delete |
| | Delete the move constructor and assignment.
|
| |
|
Basic & | operator= (Basic &&)=delete |
| | Assignment operator in continuation with above.
|
| |
| virtual hash_t | __hash__ () const =0 |
| |
| hash_t | hash () const |
| |
| bool | __neq__ (const Basic &o) const |
| | true if this is not equal to o. More...
|
| |
|
int | __cmp__ (const Basic &o) const |
| | Comparison operator.
|
| |
| std::string | __str__ () const |
| |
|
std::string | dumps () const |
| | Returns a string of the instance serialized.
|
| |
|
RCP< const Basic > | subs (const map_basic_basic &subs_dict) const |
| | Substitutes 'subs_dict' into 'self'.
|
| |
|
RCP< const Basic > | xreplace (const map_basic_basic &subs_dict) const |
| |
|
virtual RCP< const Basic > | expand_as_exp () const |
| | expands the special function in terms of exp function
|
| |
|
virtual void | accept (Visitor &v) const =0 |
| |
|
virtual void | accept (EvalRealDoubleVisitorFinal &v) const =0 |
| |
|
RCP< const Basic > | diff (const RCP< const Symbol > &x, bool cache=true) const |
| |
|
RCP< Basic > | rcp_from_this () |
| | Get RCP<T> pointer to self (it will cast the pointer to T)
|
| |
|
RCP< const Basic > | rcp_from_this () const |
| | Get RCP<const T> pointer to self (it will cast the pointer to const T)
|
| |
|
RCP< const T2 > | rcp_from_this_cast () const |
| | Get RCP<T2> pointer to self (it will cast the pointer to T2)
|
| |
|
unsigned int | use_count () const |
| |
|
|
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.
|
| |
|
|
Container | poly_ |
| |
|
set_basic | vars_ |
| |
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: