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

Public Member Functions

virtual void accept (Visitor &v) const
 
virtual void accept (EvalRealDoubleVisitorFinal &v) const
 
 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
 
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
 
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
 
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 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
virtual
Returns
canonicalized Beta

Implements SymEngine::TwoArgBasic< BaseClass >.

Definition at line 3234 of file functions.cpp.

3236 {
3237  return beta(a, b);
3238 }
RCP< const Basic > beta(const RCP< const Basic > &x, const RCP< const Basic > &y)
Canonicalize Beta:
Definition: functions.cpp:3240

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

3209 {
3210  if (x->__cmp__(*y) == -1) {
3211  return false;
3212  }
3213  if (is_a<Integer>(*x)
3214  or (is_a<Rational>(*x)
3215  and (get_den(down_cast<const Rational &>(*x).as_rational_class()))
3216  == 2)) {
3217  if (is_a<Integer>(*y)
3218  or (is_a<Rational>(*y)
3219  and (get_den(
3220  down_cast<const Rational &>(*y).as_rational_class()))
3221  == 2)) {
3222  return false;
3223  }
3224  }
3225  return true;
3226 }

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: