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

Public Member Functions

void accept (Visitor &v) const override
 
void accept (EvalRealDoubleVisitorFinal &v) const override
 
 Zeta (const RCP< const Basic > &s, const RCP< const Basic > &a)
 Zeta Constructor.
 
 Zeta (const RCP< const Basic > &s)
 Zeta Constructor.
 
RCP< const Basicget_s () const
 
RCP< const Basicget_a () const
 
bool is_canonical (const RCP< const Basic > &s, const RCP< const Basic > &a) 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
 Method to construct classes with canonicalization.
 
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 Attributes

static const TypeID type_code_id = SYMENGINE_ZETA
 

Detailed Description

Definition at line 569 of file functions.h.

Member Function Documentation

◆ create()

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

Implements SymEngine::TwoArgBasic< BaseClass >.

Definition at line 2794 of file functions.cpp.

2796 {
2797  return zeta(a, b);
2798 }
RCP< const Basic > zeta(const RCP< const Basic > &s, const RCP< const Basic > &a)
Create a new Zeta instance:
Definition: functions.cpp:2800

◆ get_a()

RCP<const Basic> SymEngine::Zeta::get_a ( ) const
inline
Returns
a_

Definition at line 595 of file functions.h.

596  {
597  return get_arg2();
598  }
RCP< const Basic > get_arg2() const
Definition: functions.h:96

◆ get_s()

RCP<const Basic> SymEngine::Zeta::get_s ( ) const
inline
Returns
s_

Definition at line 590 of file functions.h.

591  {
592  return get_arg1();
593  }
RCP< const Basic > get_arg1() const
Definition: functions.h:91

◆ is_canonical()

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

Definition at line 2779 of file functions.cpp.

2781 {
2782  if (eq(*s, *zero))
2783  return false;
2784  if (eq(*s, *one))
2785  return false;
2786  if (is_a<Integer>(*s) and is_a<Integer>(*a)) {
2787  auto s_ = down_cast<const Integer &>(*s).as_int();
2788  if (s_ < 0 || s_ % 2 == 0)
2789  return false;
2790  }
2791  return true;
2792 }
bool eq(const Basic &a, const Basic &b)
Checks equality for a and b
Definition: basic-inl.h:21

Field Documentation

◆ type_code_id

const TypeID SymEngine::Zeta::type_code_id = SYMENGINE_ZETA
static

Type_code_id shared by all instances

Definition at line 584 of file functions.h.


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