1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-11-19 06:30:29 +01:00

simplify actions of PermAut and FlipAut

This commit is contained in:
kalmarek 2020-03-25 00:51:53 +01:00
parent a1ebf530f4
commit 8248039d63
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15

View File

@ -77,25 +77,19 @@ function (λ::LTransvect)(v, pow::Integer=1)
end end
function (σ::PermAut)(v, pow::Integer=1) function (σ::PermAut)(v, pow::Integer=1)
w = deepcopy(v) w = deepcopy(v)
if pow == 1 s = (σ.perm^pow).d
@inbounds for k in eachindex(v) @inbounds for k in eachindex(v)
v[k].symbols = w[σ.perm.d[k]].symbols v[k].symbols = w[s[k]].symbols
end end
else return v
s = (σ.perm^pow).d
@inbounds for k in eachindex(v)
v[k].symbols = w[s[k]].symbols
end
end
return v
end end
function (ɛ::FlipAut)(v, pow::Integer=1) function (ɛ::FlipAut)(v, pow::Integer=1)
@inbounds if isodd(pow) @inbounds if isodd(pow)
v[ɛ.i].symbols = inv(v[ɛ.i]).symbols v[ɛ.i].symbols = inv(v[ɛ.i]).symbols
end end
return v return v
end end
(::Identity)(v, pow::Integer=1) = v (::Identity)(v, pow::Integer=1) = v