From 0180856083f53bfa35ed885995062754c54bb6fd Mon Sep 17 00:00:00 2001 From: kalmarek Date: Mon, 13 Aug 2018 20:47:54 +0200 Subject: [PATCH] remove rationalize --- src/GroupRings.jl | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/GroupRings.jl b/src/GroupRings.jl index b3c7220..dec16b2 100644 --- a/src/GroupRings.jl +++ b/src/GroupRings.jl @@ -4,7 +4,7 @@ module GroupRings using AbstractAlgebra import AbstractAlgebra: Group, GroupElem, Ring, RingElem, parent, elem_type, parent_type, mul!, addeq!, divexact -import Base: convert, show, hash, ==, +, -, *, //, /, length, norm, rationalize, deepcopy_internal, getindex, setindex!, eltype, one, zero +import Base: convert, show, hash, ==, +, -, *, //, /, length, norm, deepcopy_internal, getindex, setindex!, eltype, one, zero ############################################################################### # @@ -494,16 +494,6 @@ aug(X::GroupRingElem) = sum(X.coeffs) supp(X::GroupRingElem) = parent(X).basis[findn(X.coeffs)] -function rationalize{T<:Integer, S<:Integer}(::Type{T}, X::GroupRingElem{S}) - return convert(Rational{T}, X) -end - -function rationalize{T<:Integer, S<:Number}(::Type{T}, X::GroupRingElem{S}; - tol=eps(S)) - v = rationalize(T, X.coeffs, tol=tol) - return GroupRingElem(v, parent(X)) -end - function reverse_dict(::Type{I}, iter) where I<:Integer length(iter) > typemax(I) && error("Can not produce reverse dict: $(length(iter)) is too large for $T") return Dict{eltype(iter), I}(x => i for (i,x) in enumerate(iter))