SymEngine::UPolyBase< Container, Poly > Class Template Referenceabstract
+ Inheritance diagram for SymEngine::UPolyBase< Container, Poly >:
+ Collaboration diagram for SymEngine::UPolyBase< Container, Poly >:

Public Types

typedef Container container_type
 

Public Member Functions

 UPolyBase (const RCP< const Basic > &var, Container &&container)
 
int compare (const Basic &o) const override=0
 
hash_t __hash__ () const override=0
 
virtual int size () const =0
 
bool __eq__ (const Basic &o) const override
 
const RCP< const Basic > & get_var () const
 
const Container & get_poly () const
 
vec_basic get_args () const override
 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
 
std::string dumps () const
 Returns a string of the instance serialized.
 
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
 
virtual void accept (Visitor &v) const =0
 
virtual void accept (EvalRealDoubleVisitorFinal &v) const =0
 
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 Member Functions

static RCP< const Poly > from_container (const RCP< const Basic > &var, Container &&d)
 
- Static Public Member Functions inherited from SymEngine::Basic
static RCP< const Basicloads (const std::string &)
 Creates an instance of a serialized string.
 

Private Attributes

RCP< const Basicvar_
 
Container poly_
 

Additional Inherited Members

- Data Fields inherited from SymEngine::Basic
TypeID type_code_
 

Detailed Description

template<typename Container, typename Poly>
class SymEngine::UPolyBase< Container, Poly >

Definition at line 354 of file upolybase.h.

Member Function Documentation

◆ __eq__()

template<typename Container , typename Poly >
bool SymEngine::UPolyBase< Container, Poly >::__eq__ ( const Basic o) const
inlineoverridevirtual
Returns
true if two objects are equal

Implements SymEngine::Basic.

Definition at line 376 of file upolybase.h.

377  {
378  if (is_a<Poly>(o))
379  return eq(*var_, *(down_cast<const Poly &>(o).var_))
380  and poly_ == down_cast<const Poly &>(o).poly_;
381  return false;
382  }
bool eq(const Basic &a, const Basic &b)
Checks equality for a and b
Definition: basic-inl.h:21

◆ __hash__()

template<typename Container , typename Poly >
hash_t SymEngine::UPolyBase< Container, Poly >::__hash__ ( ) const
overridepure 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.

Implemented in SymEngine::URatPoly, SymEngine::UIntPoly, SymEngine::UExprPoly, and SymEngine::GaloisField.

◆ compare()

template<typename Container , typename Poly >
int SymEngine::UPolyBase< Container, Poly >::compare ( const Basic o) const
overridepure virtual
Returns
-1,0 or 1 after comparing

Implements SymEngine::Basic.

Implemented in SymEngine::GaloisField.


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