1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-12-25 18:25:30 +01:00

beautify rationalize of algebra elt

This commit is contained in:
kalmar 2017-02-11 13:27:14 +01:00
parent 9fd48445eb
commit c59ebe5086

View File

@ -124,9 +124,10 @@ end
ɛ(X::GroupAlgebraElement) = sum(X.coefficients)
rationalize{T<:Integer, S<:Number}(::Type{T}, X::GroupAlgebraElement{S};
tol=eps(S)) =
GroupAlgebraElement(
rationalize(T, X.coefficients, tol=tol), X.product_matrix)
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)
end
end