Exemplo n.º 1
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)
Exemplo n.º 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)
Exemplo n.º 3
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))
Exemplo n.º 4
0
 def __hash__(f):
     return hash((f.__class__.__name__, f.to_tuple(), dmp_to_tuple(f.mod, 0), f.dom))
Exemplo n.º 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))
Exemplo n.º 6
0
 def __hash__(f):
     return hash((f.__class__.__name__, f.to_tuple(), dmp_to_tuple(f.mod, 0), f.dom))