Loading...
Searching...
No Matches
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. More...
 
 Zeta (const RCP< const Basic > &s)
 Zeta Constructor. More...
 
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. More...
 
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
 
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_ZETA
 

Detailed Description

Definition at line 569 of file functions.h.

Constructor & Destructor Documentation

◆ Zeta() [1/2]

SymEngine::Zeta::Zeta ( const RCP< const Basic > &  s,
const RCP< const Basic > &  a 
)

Zeta Constructor.

Definition at line 2768 of file functions.cpp.

2769 : TwoArgFunction(s, a){SYMENGINE_ASSIGN_TYPEID()
2770 SYMENGINE_ASSERT(is_canonical(s, a))}
bool is_canonical(const RCP< const Basic > &s, const RCP< const Basic > &a) const
Definition: functions.cpp:2779

◆ Zeta() [2/2]

SymEngine::Zeta::Zeta ( const RCP< const Basic > &  s)

Zeta Constructor.

Definition at line 2772 of file functions.cpp.

2773 : TwoArgFunction(s, one)
2774{
2775 SYMENGINE_ASSIGN_TYPEID()
2776 SYMENGINE_ASSERT(is_canonical(s, one))
2777}

Member Function Documentation

◆ create() [1/3]

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

◆ create() [2/3]

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

Method to construct classes with canonicalization.

Implements SymEngine::TwoArgBasic< BaseClass >.

◆ create() [3/3]

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

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

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