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

Public Member Functions

void accept (Visitor &v) const override
 
void accept (EvalRealDoubleVisitorFinal &v) const override
 
 Beta (const RCP< const Basic > &x, const RCP< const Basic > &y)
 Beta Constructor.
 
bool is_canonical (const RCP< const Basic > &s, const RCP< const Basic > &x)
 
RCP< const Basicrewrite_as_gamma () 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
 
RCP< const Basiccreate (const vec_basic &b) const
 
- 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 Member Functions

static RCP< const Betafrom_two_basic (const RCP< const Basic > &x, const RCP< const Basic > &y)
 return Beta with ordered arguments
 

Static Public Attributes

static const TypeID type_code_id = SYMENGINE_BETA
 

Detailed Description

Definition at line 1172 of file functions.h.

Member Function Documentation

◆ create() [1/3]

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

Implements SymEngine::TwoArgBasic< BaseClass >.

Definition at line 3277 of file functions.cpp.

3279 {
3280  return beta(a, b);
3281 }
RCP< const Basic > beta(const RCP< const Basic > &x, const RCP< const Basic > &y)
Canonicalize Beta:
Definition: functions.cpp:3283

◆ create() [2/3]

virtual RCP<const Basic> SymEngine::TwoArgBasic< BaseClass >::create

The beta function, also called the Euler integral of the first kind, is a special function defined by

.. math:: \Beta(x, y) := \int^{1}_{0} t^{x-1} (1-t)^{y-1} \mathrm{d}t.

◆ create() [3/3]

RCP<const Basic> SymEngine::TwoArgBasic< BaseClass >::create
inline

The beta function, also called the Euler integral of the first kind, is a special function defined by

.. math:: \Beta(x, y) := \int^{1}_{0} t^{x-1} (1-t)^{y-1} \mathrm{d}t.

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

◆ is_canonical()

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

Definition at line 3251 of file functions.cpp.

3252 {
3253  if (x->__cmp__(*y) == -1) {
3254  return false;
3255  }
3256  if (is_a<Integer>(*x)
3257  or (is_a<Rational>(*x)
3258  and (get_den(down_cast<const Rational &>(*x).as_rational_class()))
3259  == 2)) {
3260  if (is_a<Integer>(*y)
3261  or (is_a<Rational>(*y)
3262  and (get_den(
3263  down_cast<const Rational &>(*y).as_rational_class()))
3264  == 2)) {
3265  return false;
3266  }
3267  }
3268  return true;
3269 }

Field Documentation

◆ type_code_id

const TypeID SymEngine::Beta::type_code_id = SYMENGINE_BETA
static

Type_code_id shared by all instances

Definition at line 1182 of file functions.h.


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