Loading...
Searching...
No Matches
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. More...
 
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
 
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_ATAN2
 

Detailed Description

Definition at line 501 of file functions.h.

Constructor & Destructor Documentation

◆ ATan2()

SymEngine::ATan2::ATan2 ( const RCP< const Basic > &  num,
const RCP< const Basic > &  den 
)

ATan2 Constructor.

Definition at line 1588 of file functions.cpp.

1589 : TwoArgFunction(num, den)
1590{
1591 SYMENGINE_ASSIGN_TYPEID()
1592 SYMENGINE_ASSERT(is_canonical(num, den))
1593}
bool is_canonical(const RCP< const Basic > &num, const RCP< const Basic > &den) const
Definition: functions.cpp:1595

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 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
RCP< const Basic > mul(const RCP< const Basic > &a, const RCP< const Basic > &b)
Multiplication.
Definition: mul.cpp:352
bool inverse_lookup(const umap_basic_basic &d, const RCP< const Basic > &t, const Ptr< RCP< const Basic > > &index)
Definition: functions.cpp:480

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: