Loading...
Searching...
No Matches
SymEngine::RCPBasicKeyLess Struct Reference

Our less operator (<): More...

#include <basic.h>

Public Member Functions

bool operator() (const RCP< const Basic > &x, const RCP< const Basic > &y) const
 true if x < y, false otherwise
 

Detailed Description

Our less operator (<):

Definition at line 228 of file basic.h.

Member Function Documentation

◆ operator()()

bool SymEngine::RCPBasicKeyLess::operator() ( const RCP< const Basic > &  x,
const RCP< const Basic > &  y 
) const
inline

true if x < y, false otherwise

Definition at line 230 of file basic.h.

231 {
232 hash_t xh = x->hash(), yh = y->hash();
233 if (xh != yh)
234 return xh < yh;
235 if (eq(*x, *y))
236 return false;
237 return x->__cmp__(*y) == -1;
238 }
bool eq(const Basic &a, const Basic &b)
Checks equality for a and b
Definition: basic-inl.h:21

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