예제 #1
0
파일: polyclasses.py 프로젝트: fxkr/sympy
    def to_tuple(f):
        """
        Convert `f` to a tuple representation with native coefficients.

        This is needed for hashing.
        """
        return dmp_to_tuple(f.rep, f.lev)
예제 #2
0
    def to_tuple(f):
        """
        Convert `f` to a tuple representation with native coefficients.

        This is needed for hashing.
        """
        return dmp_to_tuple(f.rep, f.lev)
예제 #3
0
파일: polyclasses.py 프로젝트: fxkr/sympy
 def __hash__(f):
     return hash((f.__class__.__name__, dmp_to_tuple(f.num, f.lev),
         dmp_to_tuple(f.den, f.lev), f.lev, f.dom))
예제 #4
0
파일: polyclasses.py 프로젝트: fxkr/sympy
 def __hash__(f):
     return hash((f.__class__.__name__, f.to_tuple(), dmp_to_tuple(f.mod, 0), f.dom))
예제 #5
0
 def __hash__(f):
     return hash((f.__class__.__name__, dmp_to_tuple(f.num, f.lev),
         dmp_to_tuple(f.den, f.lev), f.lev, f.dom))
예제 #6
0
 def __hash__(f):
     return hash((f.__class__.__name__, f.to_tuple(), dmp_to_tuple(f.mod, 0), f.dom))