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)
 
virtual int compare (const Basic &o) const =0
 
virtual hash_t __hash__ () const =0
 
virtual int size () const =0
 
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
 
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)
 

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
inlinevirtual
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 >
virtual hash_t SymEngine::UPolyBase< Container, Poly >::__hash__ ( ) const
pure 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 >
virtual int SymEngine::UPolyBase< Container, Poly >::compare ( const Basic o) const
pure 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: