mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-10-15 08:05:35 +02:00
add (RG::GroupRing)(::Vector, ::Type; alt=false)
this was previously defined in GroupRings
This commit is contained in:
parent
16dc0c7591
commit
1ca77f1f19
@ -80,6 +80,15 @@ 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}
|
||||||
|
res = RG(S)
|
||||||
|
for g in V
|
||||||
|
c = (alt ? sign(g)*one(S) : one(S))
|
||||||
|
res[g] += c/length(V)
|
||||||
|
end
|
||||||
|
return res
|
||||||
|
end
|
||||||
|
|
||||||
function idempotents(RG::GroupRing{Generic.PermGroup{S}}, T::Type=Rational{Int}) where S<:Integer
|
function idempotents(RG::GroupRing{Generic.PermGroup{S}}, T::Type=Rational{Int}) where S<:Integer
|
||||||
if RG.group.n == 1
|
if RG.group.n == 1
|
||||||
return GroupRingElem{T}[one(RG,T)]
|
return GroupRingElem{T}[one(RG,T)]
|
||||||
|
Loading…
Reference in New Issue
Block a user