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

Public Member Functions

 MIntPoly (const set_basic &vars, MIntDict &&dict)
 
virtual void accept (Visitor &v) const
 
virtual void accept (EvalRealDoubleVisitorFinal &v) const
 
hash_t __hash__ () const
 
RCP< const Basicas_symbolic () const
 
integer_class eval (std::map< RCP< const Basic >, integer_class, RCPBasicKeyLess > &vals) const
 
- Public Member Functions inherited from SymEngine::MSymEnginePoly< MIntDict, MIntPoly >
 MSymEnginePoly (const set_basic &vars, MIntDict &&dict)
 
int compare (const Basic &o) const
 
vec_basic get_args () const
 Returns the list of arguments.
 
const MIntDictget_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 ()
 Constructor.
 
 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_MINTPOLY
 

Additional Inherited Members

- Public Types inherited from SymEngine::MSymEnginePoly< MIntDict, MIntPoly >
typedef MIntDict container_type
 
typedef Container::coef_type coef_type
 
- Static Public Member Functions inherited from SymEngine::MSymEnginePoly< MIntDict, MIntPoly >
static RCP< const MIntPolyfrom_container (const set_basic &vars, MIntDict &&d)
 
static enable_if_t< is_a_UPoly< FromPoly >::value, RCP< const MIntPoly > > from_poly (const FromPoly &p)
 
static RCP< const MIntPolyfrom_dict (const vec_basic &v, typename Container::dict_type &&d)
 
static MIntDict 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 439 of file msymenginepoly.h.

Member Function Documentation

◆ __hash__()

hash_t SymEngine::MIntPoly::__hash__ ( ) const
virtual

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

Returns
64-bit integer value for the hash

Implements SymEngine::Basic.

Definition at line 22 of file msymenginepoly.cpp.

23 {
24  hash_t seed = SYMENGINE_MINTPOLY;
25  for (auto var : get_vars())
26  hash_combine<std::string>(seed, var->__str__());
27 
28  for (auto &p : get_poly().dict_) {
29  hash_t t = vec_hash<vec_uint>()(p.first);
30  hash_combine<hash_t>(t, mp_get_si(p.second));
31  seed ^= t;
32  }
33  return seed;
34 }

Field Documentation

◆ type_code_id

const TypeID SymEngine::MIntPoly::type_code_id = SYMENGINE_MINTPOLY
static

Type_code_id shared by all instances

Definition at line 445 of file msymenginepoly.h.


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