Evaluation of {R,L}Transvec, PermAut, FlipAut types
This commit is contained in:
parent
e6a0ffd3d6
commit
5f224f6713
|
@ -55,21 +55,23 @@ parent_type(::AutGroupElem) = AutGroup
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
function ϱ(i,j, pow=1)
|
function (ϱ::RTransvect)(v, pow=1::Int)
|
||||||
# @assert i ≠ j
|
return [(k==ϱ.i ? v[ϱ.i]*v[ϱ.j]^pow : v[k]) for k in eachindex(v)]
|
||||||
return v -> [(k==i ? v[i]*v[j]^pow : v[k]) for k in eachindex(v)]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function λ(i,j, pow=1)
|
function (λ::LTransvect)(v, pow=1::Int)
|
||||||
# @assert i ≠ j
|
return [(k==λ.i ? v[λ.j]^pow*v[λ.i] : v[k]) for k in eachindex(v)]
|
||||||
return v -> [(k==i ? v[j]^pow*v[i] : v[k]) for k in eachindex(v)]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function σ(p::perm, pow=1)
|
function (σ::PermAut)(v, pow=1::Int)
|
||||||
return v -> [v[(p^pow)[k]] for k in eachindex(v)]
|
return v[(σ.p^pow).d]
|
||||||
end
|
end
|
||||||
|
|
||||||
ɛ(i, pow=1) = v -> [(k==i ? v[k]^(-1*(2+pow%2)%2) : v[k]) for k in eachindex(v)]
|
function (ɛ::FlipAut)(v, pow=1::Int)
|
||||||
|
return [(k==ɛ.i ? v[k]^(-1^pow) : v[k]) for k in eachindex(v)]
|
||||||
|
end
|
||||||
|
|
||||||
|
(::Identity)(v, pow=1::Int) = v
|
||||||
|
|
||||||
# taken from ValidatedNumerics, under under the MIT "Expat" License:
|
# taken from ValidatedNumerics, under under the MIT "Expat" License:
|
||||||
# https://github.com/JuliaIntervals/ValidatedNumerics.jl/blob/master/LICENSE.md
|
# https://github.com/JuliaIntervals/ValidatedNumerics.jl/blob/master/LICENSE.md
|
||||||
|
|
Loading…
Reference in New Issue