mirror of
https://github.com/kalmarek/GroupRings.jl.git
synced 2025-01-01 11:45:28 +01:00
preserve type of coerced element
This commit is contained in:
parent
ee3b4e0761
commit
fc3cbeb14c
@ -151,11 +151,13 @@ function (RG::GroupRing)(X::GroupRingElem)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function (RG::GroupRing)(X::GroupRingElem, emb::Function)
|
function (RG::GroupRing)(X::GroupRingElem, emb::Function)
|
||||||
result = RG(eltype(X.coeffs))
|
result = RG(eltype(X.coeffs))
|
||||||
for g in parent(X).basis
|
T = typeof(X.coeffs)
|
||||||
result[emb(g)] = X[g]
|
result.coeffs = T(result.coeffs)
|
||||||
end
|
for g in parent(X).basis
|
||||||
return result
|
result[emb(g)] = X[g]
|
||||||
|
end
|
||||||
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user