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

Public Member Functions

 MultiArgFunction (const vec_basic &arg)
 Constructor.
 
hash_t __hash__ () const override
 
vec_basic get_args () const override
 Returns the list of arguments.
 
const vec_basicget_vec () const
 
virtual RCP< const Basiccreate (const vec_basic &v) const =0
 Method to construct classes with canonicalization.
 
bool __eq__ (const Basic &o) const override
 
int compare (const Basic &o) const override
 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
 
std::string dumps () const
 Returns a string of the instance serialized.
 
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

vec_basic arg_
 

Additional Inherited Members

- Static Public Member Functions inherited from SymEngine::Basic
static RCP< const Basicloads (const std::string &)
 Creates an instance of a serialized string.
 
- Data Fields inherited from SymEngine::Basic
TypeID type_code_
 

Detailed Description

Definition at line 143 of file functions.h.

Member Function Documentation

◆ __eq__()

bool SymEngine::MultiArgFunction::__eq__ ( const Basic o) const
inlineoverridevirtual

Equality comparator

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

Implements SymEngine::Basic.

Reimplemented in SymEngine::FunctionSymbol.

Definition at line 173 of file functions.h.

174  {
175  return is_same_type(*this, o)
176  and unified_eq(get_vec(),
177  down_cast<const MultiArgFunction &>(o).get_vec());
178  }
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::MultiArgFunction::__hash__ ( ) const
inlineoverridevirtual
Returns
the hash

Implements SymEngine::Basic.

Reimplemented in SymEngine::FunctionSymbol.

Definition at line 152 of file functions.h.

153  {
154  hash_t seed = this->get_type_code();
155  for (const auto &a : arg_)
156  hash_combine<Basic>(seed, *a);
157  return seed;
158  }

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