1
0
mirror of https://github.com/kalmarek/GroupRings.jl.git synced 2024-11-14 21:25:28 +01:00

rationalize

This commit is contained in:
kalmar 2017-05-16 18:45:56 +02:00
parent fc837ff481
commit d13a8b27df

View File

@ -185,14 +185,15 @@ norm(X::GroupRingElem, p=2) = norm(X.coeffs, p)
augmentation(X::GroupRingElem) = sum(X.coeffs)
end
function rationalize{T<:Integer, S<:Number}(
::Type{T}, X::GroupAlgebraElement{S}; tol=eps(S))
v = rationalize(T, X.coefficients, tol=tol)
return GroupAlgebraElement(v, X.product_matrix)
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
end
end
end