SymEngine::MExprPoly Class Reference
+ Inheritance diagram for SymEngine::MExprPoly:
+ Collaboration diagram for SymEngine::MExprPoly:

Public Member Functions

 MExprPoly (const set_basic &vars, MExprDict &&dict)
virtual void accept (Visitor &v) const
virtual void accept (EvalRealDoubleVisitorFinal &v) const
hash_t __hash__ () const
RCP< const Basicas_symbolic () const
Expression eval (std::map< RCP< const Basic >, Expression, RCPBasicKeyLess > &vals) const
- Public Member Functions inherited from SymEngine::MSymEnginePoly< MExprDict, MExprPoly >
 MSymEnginePoly (const set_basic &vars, MExprDict &&dict)
int compare (const Basic &o) const
vec_basic get_args () const
 Returns the list of arguments.
const MExprDictget_poly () const
const set_basicget_vars () const
bool __eq__ (const Basic &o) const
 Test equality. More...
- Public Member Functions inherited from SymEngine::Basic
TypeID get_type_code () const
 Basic ()
 Basic (const Basic &)=delete
 Delete the copy constructor and assignment.
Basicoperator= (const Basic &)=delete
 Assignment operator in continuation with above.
 Basic (Basic &&)=delete
 Delete the move constructor and assignment.
Basicoperator= (Basic &&)=delete
 Assignment operator in continuation with above.
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
RCP< const Basicsubs (const map_basic_basic &subs_dict) const
 Substitutes 'subs_dict' into 'self'.
RCP< const Basicxreplace (const map_basic_basic &subs_dict) const
virtual RCP< const Basicexpand_as_exp () const
 expands the special function in terms of exp function
RCP< const Basicdiff (const RCP< const Symbol > &x, bool cache=true) const
- Public Member Functions inherited from SymEngine::EnableRCPFromThis< Basic >
RCP< Basicrcp_from_this ()
 Get RCP<T> pointer to self (it will cast the pointer to T)
RCP< const Basicrcp_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 Public Attributes

static const TypeID type_code_id = SYMENGINE_MEXPRPOLY

Additional Inherited Members

- Public Types inherited from SymEngine::MSymEnginePoly< MExprDict, MExprPoly >
typedef MExprDict container_type
typedef Container::coef_type coef_type
- Static Public Member Functions inherited from SymEngine::MSymEnginePoly< MExprDict, MExprPoly >
static RCP< const MExprPolyfrom_container (const set_basic &vars, MExprDict &&d)
static enable_if_t< is_a_UPoly< FromPoly >::value, RCP< const MExprPoly > > from_poly (const FromPoly &p)
static RCP< const MExprPolyfrom_dict (const vec_basic &v, typename Container::dict_type &&d)
static MExprDict container_from_dict (const set_basic &s, typename Container::dict_type &&d)
- Data Fields inherited from SymEngine::Basic
TypeID type_code_

Detailed Description

Definition at line 454 of file msymenginepoly.h.

Member Function Documentation

◆ __hash__()

hash_t SymEngine::MExprPoly::__hash__ ( ) const

Calculates the hash of the given SymEngine class. Use Basic.hash() which gives a cached version of the hash.

64-bit integer value for the hash

Implements SymEngine::Basic.

Definition at line 70 of file msymenginepoly.cpp.

71 {
72  hash_t seed = SYMENGINE_MEXPRPOLY;
73  for (auto var : get_vars())
74  hash_combine<std::string>(seed, var->__str__());
76  for (auto &p : get_poly().dict_) {
77  hash_t t = vec_hash<vec_int>()(p.first);
78  hash_combine<Basic>(t, *(p.second.get_basic()));
79  seed ^= t;
80  }
81  return seed;
82 }

Field Documentation

◆ type_code_id

const TypeID SymEngine::MExprPoly::type_code_id = SYMENGINE_MEXPRPOLY

Type_code_id shared by all instances

Definition at line 460 of file msymenginepoly.h.

The documentation for this class was generated from the following files: