mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-26 17:05:27 +01:00
replace custom GroupRing constructor by alternating_emb function
This commit is contained in:
parent
854ddb42a1
commit
6047d496d5
@ -79,11 +79,10 @@ function central_projection(RG::GroupRing, chi::AbstractCharacter, T::Type=Ratio
|
|||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
function (RG::GroupRing{Gr,T})(V::Vector{T}, S::Type=Rational{Int}; alt=false) where {Gr<:Generic.PermGroup, T<:GroupElem}
|
function alternating_emb(RG::GroupRing{Gr,T}, V::Vector{T}, S::Type=Rational{Int}) where {Gr<:Generic.PermGroup, T<:GroupElem}
|
||||||
res = RG(S)
|
res = RG(S)
|
||||||
for g in V
|
for g in V
|
||||||
c = (alt ? sign(g)*one(S) : one(S))
|
res[g] += sign(g)
|
||||||
res[g] += c/length(V)
|
|
||||||
end
|
end
|
||||||
return res
|
return res
|
||||||
end
|
end
|
||||||
@ -112,7 +111,7 @@ function idempotents(RG::GroupRing{Generic.PermGroup{S}}, T::Type=Rational{Int})
|
|||||||
idems = Vector{GroupRingElem{T}}()
|
idems = Vector{GroupRingElem{T}}()
|
||||||
|
|
||||||
for p in projs
|
for p in projs
|
||||||
append!(idems, [RG(p, T), RG(p, T, alt=true)])
|
append!(idems, [RG(p, T)//length(p), alternating_emb(RG, p, T)//length(p)])
|
||||||
end
|
end
|
||||||
|
|
||||||
return unique(idems)
|
return unique(idems)
|
||||||
|
Loading…
Reference in New Issue
Block a user