mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-09-05 14:46:44 +02:00
rationalize for Integral Group Rings
This commit is contained in:
parent
92daac300b
commit
ca3ec95ea2
@ -349,6 +349,10 @@ norm(X::GroupRingElem, p=2) = norm(X.coeffs, p)
|
|||||||
|
|
||||||
augmentation(X::GroupRingElem) = sum(X.coeffs)
|
augmentation(X::GroupRingElem) = sum(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};
|
function rationalize{T<:Integer, S<:Number}(::Type{T}, X::GroupRingElem{S};
|
||||||
tol=eps(S))
|
tol=eps(S))
|
||||||
v = rationalize(T, X.coeffs, tol=tol)
|
v = rationalize(T, X.coeffs, tol=tol)
|
||||||
|
Loading…
Reference in New Issue
Block a user