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
1 changed files with 10 additions and 16 deletions

View File

@ -78,16 +78,10 @@ end
function (σ::PermAut)(v, pow::Integer=1)
w = deepcopy(v)
if pow == 1
@inbounds for k in eachindex(v)
v[k].symbols = w[σ.perm.d[k]].symbols
end
else
s = (σ.perm^pow).d
@inbounds for k in eachindex(v)
v[k].symbols = w[s[k]].symbols
end
end
return v
end