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

Public Member Functions

virtual void accept (Visitor &v) const
 
virtual void accept (EvalRealDoubleVisitorFinal &v) const
 
 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
 
virtual RCP< const Basiccreate (const RCP< const Basic > &a, const RCP< const Basic > &b) const
 
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
 
RCP< const Basicget_arg1 () const
 
RCP< const Basicget_arg2 () const
 
virtual vec_basic get_args () const
 
RCP< const Basiccreate (const vec_basic &b) const
 
virtual bool __eq__ (const Basic &o) const
 
virtual int compare (const Basic &o) const
 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
virtual
Returns
canonicalized UpperGamma

Implements SymEngine::TwoArgBasic< BaseClass >.

Definition at line 3104 of file functions.cpp.

3106 {
3107  return uppergamma(a, b);
3108 }
RCP< const Basic > uppergamma(const RCP< const Basic > &s, const RCP< const Basic > &x)
Canonicalize UpperGamma:
Definition: functions.cpp:3110

◆ 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 3084 of file functions.cpp.

3086 {
3087  // Only special values are evaluated
3088  if (eq(*s, *one))
3089  return false;
3090  if (is_a<Integer>(*s)
3091  and down_cast<const Integer &>(*s).as_integer_class() > 1)
3092  return false;
3093  if (is_a<Integer>(*mul(i2, s)))
3094  return false;
3095 #ifdef HAVE_SYMENGINE_MPFR
3096 #if MPFR_VERSION_MAJOR > 3
3097  if (is_a<RealMPFR>(*s) && is_a<RealMPFR>(*x))
3098  return false;
3099 #endif
3100 #endif
3101  return true;
3102 }
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:347

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: