Loading...
Searching...
No Matches
SymEngine::BasicToURatPoly< Poly > Class Template Reference
+ Inheritance diagram for SymEngine::BasicToURatPoly< Poly >:
+ Collaboration diagram for SymEngine::BasicToURatPoly< Poly >:

Public Member Functions

 BasicToURatPoly (const RCP< const Basic > &gen)
 
void bvisit (const Rational &x)
 
void dict_set (unsigned int pow, const Basic &x)
 
- Public Member Functions inherited from SymEngine::BasicToUPolyBase< Poly, BasicToURatPoly< Poly > >
 BasicToUPolyBase (const RCP< const Basic > &gen_)
 
apply (const Basic &b)
 
void dict_set (unsigned int pow, const Basic &x)
 
void bvisit (const Pow &x)
 
void bvisit (const Add &x)
 
void bvisit (const Mul &x)
 
void bvisit (const Integer &x)
 
void bvisit (const Poly &x)
 
void bvisit (const Basic &x)
 

Additional Inherited Members

- Public Types inherited from SymEngine::BasicToUPolyBase< Poly, BasicToURatPoly< Poly > >
using D = typename P::container_type
 
- Data Fields inherited from SymEngine::BasicToUPolyBase< Poly, BasicToURatPoly< Poly > >
RCP< const Basicgen
 
dict
 

Detailed Description

template<typename Poly>
class SymEngine::BasicToURatPoly< Poly >

Definition at line 237 of file basic_conversions.h.

Constructor & Destructor Documentation

◆ BasicToURatPoly()

template<typename Poly >
SymEngine::BasicToURatPoly< Poly >::BasicToURatPoly ( const RCP< const Basic > &  gen)
inline

Definition at line 243 of file basic_conversions.h.

244 : BasicToUPolyBase<Poly, BasicToURatPoly<Poly>>(gen)
245 {
246 }

Member Function Documentation

◆ bvisit()

template<typename Poly >
void SymEngine::BasicToURatPoly< Poly >::bvisit ( const Rational x)
inline

Definition at line 248 of file basic_conversions.h.

249 {
250 this->dict = URatDict(x.as_rational_class());
251 }

◆ dict_set()

template<typename Poly >
void SymEngine::BasicToURatPoly< Poly >::dict_set ( unsigned int  pow,
const Basic x 
)
inline

Definition at line 253 of file basic_conversions.h.

254 {
255 if (is_a<const Integer>(x))
256 this->dict = Poly::container_from_dict(
257 this->gen, {{pow, rational_class(static_cast<const Integer &>(x)
258 .as_integer_class())}});
259 else if (is_a<const Rational>(x))
260 this->dict = Poly::container_from_dict(
261 this->gen,
262 {{pow, static_cast<const Rational &>(x).as_rational_class()}});
263 else
264 throw SymEngineException("Non-rational found");
265 }
T pow(T... args)

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