mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-27 01:10:28 +01:00
beautify rationalize of algebra elt
This commit is contained in:
parent
9fd48445eb
commit
c59ebe5086
@ -124,9 +124,10 @@ end
|
|||||||
|
|
||||||
ɛ(X::GroupAlgebraElement) = sum(X.coefficients)
|
ɛ(X::GroupAlgebraElement) = sum(X.coefficients)
|
||||||
|
|
||||||
rationalize{T<:Integer, S<:Number}(::Type{T}, X::GroupAlgebraElement{S};
|
function rationalize{T<:Integer, S<:Number}(
|
||||||
tol=eps(S)) =
|
::Type{T}, X::GroupAlgebraElement{S}; tol=eps(S))
|
||||||
GroupAlgebraElement(
|
v = rationalize(T, X.coefficients, tol=tol)
|
||||||
rationalize(T, X.coefficients, tol=tol), X.product_matrix)
|
return GroupAlgebraElement(v, X.product_matrix)
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user