Loading...
Searching...
No Matches
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. More...
 
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. More...
 
RCP< const Basiccreate (const vec_basic &b) const
 The upper incomplete gamma function. More...
 
- 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
 
virtual RCP< const Basiccreate (const RCP< const Basic > &a, const RCP< const Basic > &b) const =0
 Method to construct classes with canonicalization. More...
 
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. More...
 

Static Public Attributes

static const TypeID type_code_id = SYMENGINE_UPPERGAMMA
 

Detailed Description

Definition at line 1128 of file functions.h.

Constructor & Destructor Documentation

◆ UpperGamma()

SymEngine::UpperGamma::UpperGamma ( const RCP< const Basic > &  s,
const RCP< const Basic > &  x 
)

UpperGamma Constructor.

Definition at line 3120 of file functions.cpp.

3121 : TwoArgFunction(s, x)
3122{
3123 SYMENGINE_ASSIGN_TYPEID()
3124 SYMENGINE_ASSERT(is_canonical(s, x))
3125}
bool is_canonical(const RCP< const Basic > &s, const RCP< const Basic > &x) const
Definition: functions.cpp:3127

Member Function Documentation

◆ create() [1/3]

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 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

◆ create() [2/3]

virtual RCP< const Basic > SymEngine::TwoArgBasic< BaseClass >::create ( const RCP< const Basic > &  a,
const RCP< const Basic > &  b 
) const
virtual

The upper incomplete gamma function.

Implements SymEngine::TwoArgBasic< BaseClass >.

◆ create() [3/3]

RCP< const Basic > SymEngine::TwoArgBasic< BaseClass >::create ( const vec_basic b) const
inline

The upper incomplete gamma function.

Definition at line 108 of file functions.h.

109 {
110 SYMENGINE_ASSERT(b.size() == 2);
111 return create(b[0], b[1]);
112 }
virtual RCP< const Basic > create(const RCP< const Basic > &a, const RCP< const Basic > &b) const
Definition: functions.cpp:3147

◆ 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: