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

Public Member Functions

virtual void accept (Visitor &v) const
 
virtual void accept (EvalRealDoubleVisitorFinal &v) const
 
 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
 
virtual RCP< const Basiccreate (const RCP< const Basic > &a, const RCP< const 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_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
virtual
Returns
canonicalized atan2

Implements SymEngine::TwoArgBasic< BaseClass >.

Definition at line 1565 of file functions.cpp.

1567 {
1568  return atan2(a, b);
1569 }
RCP< const Basic > atan2(const RCP< const Basic > &num, const RCP< const Basic > &den)
Canonicalize ATan2:
Definition: functions.cpp:1571

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

1554 {
1555  if (eq(*num, *zero) or eq(*num, *den) or eq(*num, *mul(minus_one, den)))
1556  return false;
1557  RCP<const Basic> index;
1558  bool b = inverse_lookup(inverse_tct, div(num, den), outArg(index));
1559  if (b)
1560  return false;
1561  else
1562  return true;
1563 }
RCP< const Basic > div(const RCP< const Basic > &a, const RCP< const Basic > &b)
Division.
Definition: mul.cpp:426
bool inverse_lookup(umap_basic_basic &d, const RCP< const Basic > &t, const Ptr< RCP< const Basic >> &index)
Definition: functions.cpp:437
bool eq(const Basic &a, const Basic &b)
Checks equality for a and b
Definition: basic-inl.h:21
RCP< const Basic > mul(const RCP< const Basic > &a, const RCP< const Basic > &b)
Multiplication.
Definition: mul.cpp:347

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: