예제 #1
0
int PyFunction::compare(const Basic &o) const {
    SYMENGINE_ASSERT(is_a<PyFunction>(o))
    const PyFunction &s = static_cast<const PyFunction &>(o);
    int cmp = pyfunction_class_->compare(*s.get_pyfunction_class());
    if (cmp != 0) return cmp;
    return vec_basic_compare(arg_, s.arg_);
}
예제 #2
0
int Derivative::compare(const Basic &o) const
{
    CSYMPY_ASSERT(is_a<Derivative>(o))
    const Derivative &s = static_cast<const Derivative &>(o);
    int cmp = arg_->__cmp__(*(s.arg_));
    if (cmp != 0) return cmp;
    cmp = vec_basic_compare(x_, s.x_);
    return cmp;
}