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

Public Member Functions

void accept (Visitor &v) const override
 
void accept (EvalRealDoubleVisitorFinal &v) const override
 
 UpperGamma (const RCP< const Basic > &s, const RCP< const Basic > &x)
 UpperGamma Constructor.
 
bool is_canonical (const RCP< const Basic > &s, const RCP< const Basic > &x) const
 
RCP< const Basiccreate (const RCP< const Basic > &a, const RCP< const Basic > &b) const override
 
virtual RCP< const Basiccreate (const RCP< const Basic > &a, const RCP< const Basic > &b) const=0
 The upper incomplete gamma function.
 
RCP< const Basiccreate (const vec_basic &b) const
 The upper incomplete gamma function.
 
- Public Member Functions inherited from SymEngine::TwoArgBasic< BaseClass >
 TwoArgBasic (const RCP< const Basic > &a, const RCP< const Basic > &b)
 b in TwoArgBasic(a, b) More...
 
hash_t __hash__ () const override
 
RCP< const Basicget_arg1 () const
 
RCP< const Basicget_arg2 () const
 
vec_basic get_args () const override
 
RCP< const Basiccreate (const vec_basic &b) const
 
bool __eq__ (const Basic &o) const override
 
int compare (const Basic &o) const override
 Structural equality comparator.
 

Static Public Attributes

static const TypeID type_code_id = SYMENGINE_UPPERGAMMA
 

Detailed Description

Definition at line 1128 of file functions.h.

Member Function Documentation

◆ create()

RCP< const Basic > SymEngine::UpperGamma::create ( const RCP< const Basic > &  a,
const RCP< const Basic > &  b 
) const
overridevirtual
Returns
canonicalized UpperGamma

Implements SymEngine::TwoArgBasic< BaseClass >.

Definition at line 3147 of file functions.cpp.

3149 {
3150  return uppergamma(a, b);
3151 }
RCP< const Basic > uppergamma(const RCP< const Basic > &s, const RCP< const Basic > &x)
Canonicalize UpperGamma:
Definition: functions.cpp:3153

◆ is_canonical()

bool SymEngine::UpperGamma::is_canonical ( const RCP< const Basic > &  s,
const RCP< const Basic > &  x 
) const
Returns
true if canonical

Definition at line 3127 of file functions.cpp.

3129 {
3130  // Only special values are evaluated
3131  if (eq(*s, *one))
3132  return false;
3133  if (is_a<Integer>(*s)
3134  and down_cast<const Integer &>(*s).as_integer_class() > 1)
3135  return false;
3136  if (is_a<Integer>(*mul(i2, s)))
3137  return false;
3138 #ifdef HAVE_SYMENGINE_MPFR
3139 #if MPFR_VERSION_MAJOR > 3
3140  if (is_a<RealMPFR>(*s) && is_a<RealMPFR>(*x))
3141  return false;
3142 #endif
3143 #endif
3144  return true;
3145 }
bool eq(const Basic &a, const Basic &b)
Checks equality for a and b
Definition: basic-inl.h:21
RCP< const Basic > mul(const RCP< const Basic > &a, const RCP< const Basic > &b)
Multiplication.
Definition: mul.cpp:352

Field Documentation

◆ type_code_id

const TypeID SymEngine::UpperGamma::type_code_id = SYMENGINE_UPPERGAMMA
static

Type_code_id shared by all instances

Definition at line 1133 of file functions.h.


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