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

Public Member Functions

void accept (Visitor &v) const override
 
void accept (EvalRealDoubleVisitorFinal &v) const override
 
 ATan2 (const RCP< const Basic > &num, const RCP< const Basic > &den)
 ATan2 Constructor.
 
bool is_canonical (const RCP< const Basic > &num, const RCP< const Basic > &den) const
 
RCP< const Basicget_num () const
 
RCP< const Basicget_den () const
 
RCP< const Basiccreate (const RCP< const Basic > &a, const RCP< const Basic > &b) const override
 
- 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_ATAN2
 

Detailed Description

Definition at line 501 of file functions.h.

Member Function Documentation

◆ create()

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

Implements SymEngine::TwoArgBasic< BaseClass >.

Definition at line 1608 of file functions.cpp.

1610 {
1611  return atan2(a, b);
1612 }
RCP< const Basic > atan2(const RCP< const Basic > &num, const RCP< const Basic > &den)
Canonicalize ATan2:
Definition: functions.cpp:1614

◆ get_den()

RCP<const Basic> SymEngine::ATan2::get_den ( ) const
inline
Returns
x in atan2(y, x)

Definition at line 516 of file functions.h.

517  {
518  return get_arg2();
519  }
RCP< const Basic > get_arg2() const
Definition: functions.h:96

◆ get_num()

RCP<const Basic> SymEngine::ATan2::get_num ( ) const
inline
Returns
y in atan2(y, x)

Definition at line 511 of file functions.h.

512  {
513  return get_arg1();
514  }
RCP< const Basic > get_arg1() const
Definition: functions.h:91

◆ is_canonical()

bool SymEngine::ATan2::is_canonical ( const RCP< const Basic > &  num,
const RCP< const Basic > &  den 
) const
Returns
true if canonical

Definition at line 1595 of file functions.cpp.

1597 {
1598  if (eq(*num, *zero) or eq(*num, *den) or eq(*num, *mul(minus_one, den)))
1599  return false;
1600  RCP<const Basic> index;
1601  bool b = inverse_lookup(inverse_tct(), div(num, den), outArg(index));
1602  if (b)
1603  return false;
1604  else
1605  return true;
1606 }
RCP< const Basic > div(const RCP< const Basic > &a, const RCP< const Basic > &b)
Division.
Definition: mul.cpp:431
bool eq(const Basic &a, const Basic &b)
Checks equality for a and b
Definition: basic-inl.h:21
bool inverse_lookup(const umap_basic_basic &d, const RCP< const Basic > &t, const Ptr< RCP< const Basic >> &index)
Definition: functions.cpp:480
RCP< const Basic > mul(const RCP< const Basic > &a, const RCP< const Basic > &b)
Multiplication.
Definition: mul.cpp:352

Field Documentation

◆ type_code_id

const TypeID SymEngine::ATan2::type_code_id = SYMENGINE_ATAN2
static

Type_code_id shared by all instances

Definition at line 504 of file functions.h.


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