simple constructor from support of GroupRingElem

This commit is contained in:
kalmarek 2018-08-13 19:33:19 +02:00
parent 29f5bc1ee7
commit 4dd2c02a4c
1 changed files with 3 additions and 6 deletions

View File

@ -153,12 +153,9 @@ function (RG::GroupRing){T<:Number}(x::AbstractVector{T})
return result
end
function (RG::GroupRing{Gr,T}){Gr<:Group, T<:GroupElem}(V::Vector{T},
S::Type=Rational{Int}; alt=false)
res = RG(S)
for g in V
c = (alt ? sign(g)*one(S) : one(S))
res[g] += c/length(V)
function (RG::GroupRing{Gr,T}){Gr<:Group, T<:GroupElem}(V::Vector{T}, S::Type=Int)
res = RG(S)
for g in V
end
return res
end