mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2024-12-29 11:00:28 +01:00
rationalize
This commit is contained in:
parent
fc837ff481
commit
d13a8b27df
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user