SymEngine::OneArgFunction Class Referenceabstract
+ Inheritance diagram for SymEngine::OneArgFunction:
+ Collaboration diagram for SymEngine::OneArgFunction:

Public Member Functions

 OneArgFunction (const RCP< const Basic > &arg)
 The arg in OneArgFunction(arg) More...
 
hash_t __hash__ () const
 
RCP< const Basicget_arg () const
 
virtual vec_basic get_args () const
 Returns the list of arguments.
 
virtual RCP< const Basiccreate (const RCP< const Basic > &arg) const =0
 Method to construct classes with canonicalization.
 
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.
 
- Public Member Functions inherited from SymEngine::Basic
TypeID get_type_code () const
 
 Basic ()
 Constructor.
 
 Basic (const Basic &)=delete
 Delete the copy constructor and assignment.
 
Basicoperator= (const Basic &)=delete
 Assignment operator in continuation with above.
 
 Basic (Basic &&)=delete
 Delete the move constructor and assignment.
 
Basicoperator= (Basic &&)=delete
 Assignment operator in continuation with above.
 
hash_t hash () const
 
bool __neq__ (const Basic &o) const
 true if this is not equal to o. More...
 
int __cmp__ (const Basic &o) const
 Comparison operator.
 
std::string __str__ () const
 
RCP< const Basicsubs (const map_basic_basic &subs_dict) const
 Substitutes 'subs_dict' into 'self'.
 
RCP< const Basicxreplace (const map_basic_basic &subs_dict) const
 
virtual RCP< const Basicexpand_as_exp () const
 expands the special function in terms of exp function
 
virtual void accept (Visitor &v) const =0
 
virtual void accept (EvalRealDoubleVisitorFinal &v) const =0
 
RCP< const Basicdiff (const RCP< const Symbol > &x, bool cache=true) const
 
- Public Member Functions inherited from SymEngine::EnableRCPFromThis< Basic >
RCP< Basicrcp_from_this ()
 Get RCP<T> pointer to self (it will cast the pointer to T)
 
RCP< const Basicrcp_from_this () const
 Get RCP<const T> pointer to self (it will cast the pointer to const T)
 
RCP< const T2 > rcp_from_this_cast () const
 Get RCP<T2> pointer to self (it will cast the pointer to T2)
 
unsigned int use_count () const
 

Private Attributes

RCP< const Basicarg_
 

Additional Inherited Members

- Data Fields inherited from SymEngine::Basic
TypeID type_code_
 

Detailed Description

Definition at line 21 of file functions.h.

Constructor & Destructor Documentation

◆ OneArgFunction()

SymEngine::OneArgFunction::OneArgFunction ( const RCP< const Basic > &  arg)
inline

The arg in OneArgFunction(arg)

Constructor

Definition at line 27 of file functions.h.

27 : arg_{arg} {};

Member Function Documentation

◆ __eq__()

virtual bool SymEngine::OneArgFunction::__eq__ ( const Basic o) const
inlinevirtual

Equality comparator

Parameters
o- Object to be compared with
Returns
whether the 2 objects are equal

Implements SymEngine::Basic.

Definition at line 57 of file functions.h.

58  {
59  return is_same_type(*this, o)
60  and eq(*get_arg(),
61  *down_cast<const OneArgFunction &>(o).get_arg());
62  }
RCP< const Basic > get_arg() const
Definition: functions.h:36
bool eq(const Basic &a, const Basic &b)
Checks equality for a and b
Definition: basic-inl.h:21
bool is_same_type(const Basic &a, const Basic &b)
Returns true if a and b are exactly the same type T.
Definition: basic-inl.h:47

◆ __hash__()

hash_t SymEngine::OneArgFunction::__hash__ ( ) const
inlinevirtual
Returns
the hash

Implements SymEngine::Basic.

Definition at line 29 of file functions.h.

30  {
31  hash_t seed = this->get_type_code();
32  hash_combine<Basic>(seed, *arg_);
33  return seed;
34  }

◆ get_arg()

RCP<const Basic> SymEngine::OneArgFunction::get_arg ( ) const
inline
Returns
arg_

Definition at line 36 of file functions.h.

37  {
38  return arg_;
39  }

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