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

Public Member Functions

virtual void accept (Visitor &v) const
 
virtual void accept (EvalRealDoubleVisitorFinal &v) const
 
 UIntPoly (const RCP< const Basic > &var, UIntDict &&dict)
 Constructor of UIntPoly class.
 
hash_t __hash__ () const
 
- Public Member Functions inherited from SymEngine::USymEnginePoly< UIntDict, UIntPolyBase, UIntPoly >
 USymEnginePoly (const RCP< const Basic > &var, UIntDict &&dict)
 
int compare (const Basic &o) const
 
bool is_canonical (const UIntDict &dict) const
 
Cf eval (const Cf &x) const
 
const std::map< Key, Cf > & get_dict () const
 
Cf get_coeff (Key x) const
 
iterator begin () const
 
iterator end () const
 
r_iterator obegin () const
 
r_iterator oend () const
 
int size () const
 
- Public Member Functions inherited from SymEngine::UIntPolyBase< Container, Poly >
 UIntPolyBase (const RCP< const Basic > &var, Container &&container)
 
RCP< const Basicas_symbolic () const
 
- Public Member Functions inherited from SymEngine::UNonExprPoly< Container, Poly, integer_class >
 UNonExprPoly (const RCP< const Basic > &var, Container &&container)
 
virtual integer_class get_coeff (unsigned int i) const=0
 
std::vector< integer_class > multieval (const std::vector< integer_class > &v) const
 
int get_degree () const
 
integer_class get_lc () const
 
- Public Member Functions inherited from SymEngine::UPolyBase< Container, Poly >
 UPolyBase (const RCP< const Basic > &var, Container &&container)
 
bool __eq__ (const Basic &o) const
 
const RCP< const Basic > & get_var () const
 
const Container & get_poly () const
 
vec_basic get_args () const
 Returns the list of arguments.
 
- 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_UINTPOLY
 

Additional Inherited Members

- Public Types inherited from SymEngine::USymEnginePoly< UIntDict, UIntPolyBase, UIntPoly >
using Cf = typename UIntPolyBase< UIntDict, UIntPoly >::coef_type
 
using Key = typename Container::key_type
 
typedef std::map< Key, Cf >::const_iterator iterator
 
typedef std::map< Key, Cf >::const_reverse_iterator r_iterator
 
- Public Types inherited from SymEngine::UNonExprPoly< Container, Poly, integer_class >
typedef integer_class coef_type
 
- Public Types inherited from SymEngine::UPolyBase< Container, Poly >
typedef Container container_type
 
- Static Public Member Functions inherited from SymEngine::USymEnginePoly< UIntDict, UIntPolyBase, UIntPoly >
static RCP< const UIntPolyfrom_vec (const RCP< const Basic > &var, const std::vector< Cf > &v)
 
static UIntDict container_from_dict (const RCP< const Basic > &var, std::map< Key, Cf > &&d)
 
static enable_if_t< is_a_UPoly< FromPoly >::value, RCP< const UIntPoly > > from_poly (const FromPoly &p)
 
- Static Public Member Functions inherited from SymEngine::UNonExprPoly< Container, Poly, integer_class >
static RCP< const Poly > from_dict (const RCP< const Basic > &var, std::map< unsigned, integer_class > &&d)
 
- Static Public Member Functions inherited from SymEngine::UPolyBase< Container, Poly >
static RCP< const Poly > from_container (const RCP< const Basic > &var, Container &&d)
 
- Data Fields inherited from SymEngine::Basic
TypeID type_code_
 

Detailed Description

Definition at line 115 of file uintpoly.h.

Member Function Documentation

◆ __hash__()

hash_t SymEngine::UIntPoly::__hash__ ( ) const
virtual
Returns
size of the hash

Implements SymEngine::UPolyBase< Container, Poly >.

Definition at line 11 of file uintpoly.cpp.

12 {
13  hash_t seed = SYMENGINE_UINTPOLY;
14 
15  seed += get_var()->hash();
16  for (const auto &it : get_poly().dict_) {
17  hash_t temp = SYMENGINE_UINTPOLY;
18  hash_combine<unsigned int>(temp, it.first);
19  hash_combine<long long int>(temp, mp_get_si(it.second));
20  seed += temp;
21  }
22  return seed;
23 }

Field Documentation

◆ type_code_id

const TypeID SymEngine::UIntPoly::type_code_id = SYMENGINE_UINTPOLY
static

Type_code_id shared by all instances

Definition at line 118 of file uintpoly.h.


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