1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-12-24 18:05:27 +01:00

rename field of PermAut p->perm

This commit is contained in:
kalmarek 2018-03-28 12:19:18 +02:00
parent 41abf789ef
commit 6b0499005f

View File

@ -19,7 +19,7 @@ struct FlipAut
end end
struct PermAut struct PermAut
p::Nemo.Generic.perm{Int8} perm::Nemo.Generic.perm{Int8}
end end
struct Identity end struct Identity end
@ -75,7 +75,7 @@ end
function (σ::PermAut)(v, pow=1::Int) function (σ::PermAut)(v, pow=1::Int)
w = deepcopy(v) w = deepcopy(v)
s = (σ.p^pow).d s = (σ.perm^pow).d
@inbounds for k in eachindex(v) @inbounds for k in eachindex(v)
v[k].symbols = w[s[k]].symbols v[k].symbols = w[s[k]].symbols
end end
@ -274,7 +274,7 @@ function change_pow(s::AutSymbol, n::Int)
if isa(symbol, FlipAut) if isa(symbol, FlipAut)
return flip_autsymbol(symbol.i, pow=n) return flip_autsymbol(symbol.i, pow=n)
elseif isa(symbol, PermAut) elseif isa(symbol, PermAut)
return perm_autsymbol(symbol.p, pow=n) return perm_autsymbol(symbol.perm, pow=n)
elseif isa(symbol, RTransvect) elseif isa(symbol, RTransvect)
return rmul_autsymbol(symbol.i, symbol.j, pow=n) return rmul_autsymbol(symbol.i, symbol.j, pow=n)
elseif isa(symbol, LTransvect) elseif isa(symbol, LTransvect)
@ -321,8 +321,12 @@ inv(f::AutSymbol) = change_pow(f, -f.pow)
############################################################################### ###############################################################################
function getperm(s::AutSymbol) function getperm(s::AutSymbol)
isa(s.typ, PermAut) || throw("$s is not a permutation automorphism") if s.pow != 1
return s.typ.p warn("Power for perm_symbol should be never 0!")
return s.typ.perm^s.pow
else
return s.typ.perm
end
end end
function simplify_perms!(W::Automorphism) function simplify_perms!(W::Automorphism)