Loading...
Searching...
No Matches
SymEngine::URatPoly Class Reference
+ Inheritance diagram for SymEngine::URatPoly:
+ Collaboration diagram for SymEngine::URatPoly:

Public Member Functions

void accept (Visitor &v) const override
 
void accept (EvalRealDoubleVisitorFinal &v) const override
 
 URatPoly (const RCP< const Basic > &var, URatDict &&dict)
 Constructor of URatPoly class.
 
hash_t __hash__ () const override
 
- Public Member Functions inherited from SymEngine::USymEnginePoly< URatDict, URatPolyBase, URatPoly >
 USymEnginePoly (const RCP< const Basic > &var, URatDict &&dict)
 
int compare (const Basic &o) const
 
bool is_canonical (const URatDict &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
 

Static Public Attributes

static const TypeID type_code_id = SYMENGINE_URATPOLY
 

Additional Inherited Members

- Public Types inherited from SymEngine::USymEnginePoly< URatDict, URatPolyBase, URatPoly >
using Cf = typename URatPolyBase< URatDict, URatPoly >::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
 
- Static Public Member Functions inherited from SymEngine::USymEnginePoly< URatDict, URatPolyBase, URatPoly >
static RCP< const URatPolyfrom_vec (const RCP< const Basic > &var, const std::vector< Cf > &v)
 
static URatDict container_from_dict (const RCP< const Basic > &var, std::map< Key, Cf > &&d)
 
static enable_if_t< is_a_UPoly< FromPoly >::value, RCP< const URatPoly > > from_poly (const FromPoly &p)
 

Detailed Description

Definition at line 38 of file uratpoly.h.

Constructor & Destructor Documentation

◆ URatPoly()

SymEngine::URatPoly::URatPoly ( const RCP< const Basic > &  var,
URatDict &&  dict 
)

Constructor of URatPoly class.

Definition at line 6 of file uratpoly.cpp.

7 : USymEnginePoly(
8 var, std::move(dict)){SYMENGINE_ASSIGN_TYPEID()
9 SYMENGINE_ASSERT(is_canonical(get_poly()))}
T move(T... args)

Member Function Documentation

◆ __hash__()

hash_t SymEngine::URatPoly::__hash__ ( ) const
override
Returns
size of the hash

Definition at line 11 of file uratpoly.cpp.

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

Field Documentation

◆ type_code_id

const TypeID SymEngine::URatPoly::type_code_id = SYMENGINE_URATPOLY
static

Type_code_id shared by all instances

Definition at line 41 of file uratpoly.h.


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