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

Public Member Functions

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

Implements SymEngine::TwoArgBasic< BaseClass >.

Definition at line 2751 of file functions.cpp.

2753 {
2754  return zeta(a, b);
2755 }
RCP< const Basic > zeta(const RCP< const Basic > &s, const RCP< const Basic > &a)
Create a new Zeta instance:
Definition: functions.cpp:2757

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

2738 {
2739  if (eq(*s, *zero))
2740  return false;
2741  if (eq(*s, *one))
2742  return false;
2743  if (is_a<Integer>(*s) and is_a<Integer>(*a)) {
2744  auto s_ = down_cast<const Integer &>(*s).as_int();
2745  if (s_ < 0 || s_ % 2 == 0)
2746  return false;
2747  }
2748  return true;
2749 }
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: