mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-26 17:05:27 +01:00
reorganize actions
This commit is contained in:
parent
f4f9dfe21d
commit
55b7ed09bc
@ -178,6 +178,20 @@ end
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
function (g::GroupRingElem)(y::GroupRingElem)
|
||||||
|
res = parent(y)()
|
||||||
|
for elt in GroupRings.supp(g)
|
||||||
|
res += g[elt]*elt(y)
|
||||||
|
end
|
||||||
|
return res
|
||||||
|
end
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
#
|
||||||
|
# perm actions
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
function (g::perm)(y::GroupRingElem)
|
function (g::perm)(y::GroupRingElem)
|
||||||
RG = parent(y)
|
RG = parent(y)
|
||||||
result = zero(RG, eltype(y.coeffs))
|
result = zero(RG, eltype(y.coeffs))
|
||||||
@ -199,12 +213,15 @@ function (g::perm)(y::GroupRingElem{T, <:SparseVector}) where T
|
|||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
function (g::GroupRingElem)(y::GroupRingElem)
|
function (p::perm)(A::MatElem)
|
||||||
res = parent(y)()
|
length(p.d) == size(A, 1) == size(A,2) || throw("Can't act via $p on matrix of size $(size(A))")
|
||||||
for elt in GroupRings.supp(g)
|
result = similar(A)
|
||||||
res += g[elt]*elt(y)
|
@inbounds for i in 1:size(A, 1)
|
||||||
|
for j in 1:size(A, 2)
|
||||||
|
result[p[i],p[j]] = A[i,j] # action by permuting rows and colums/conjugation
|
||||||
|
end
|
||||||
end
|
end
|
||||||
return res
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
function (p::perm)(A::MatElem)
|
function (p::perm)(A::MatElem)
|
||||||
@ -219,14 +236,20 @@ end
|
|||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
# Action of WreathProductElems on Nemo.MatElem
|
# WreathProductElems action on Nemo.MatElem
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
function matrix_emb(n::DirectPowerGroupElem, p::perm)
|
function (g::WreathProductElem)(y::GroupRingElem)
|
||||||
Id = parent(n.elts[1])()
|
RG = parent(y)
|
||||||
elt = Diagonal([(el == Id ? 1 : -1) for el in n.elts])
|
result = zero(RG, eltype(y.coeffs))
|
||||||
return elt[:, p.d]
|
|
||||||
|
for (idx, c) in enumerate(y.coeffs)
|
||||||
|
if c!= zero(eltype(y.coeffs))
|
||||||
|
result[g(RG.basis[idx])] = c
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
function (g::WreathProductElem{N})(A::MatElem) where N
|
function (g::WreathProductElem{N})(A::MatElem) where N
|
||||||
@ -241,17 +264,6 @@ function (g::WreathProductElem{N})(A::MatElem) where N
|
|||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
function (p::perm)(A::MatElem)
|
|
||||||
length(p.d) == size(A, 1) == size(A,2) || throw("Can't act via $p on matrix of size $(size(A))")
|
|
||||||
result = similar(A)
|
|
||||||
@inbounds for i in 1:size(A, 1)
|
|
||||||
for j in 1:size(A, 2)
|
|
||||||
result[p[i],p[j]] = A[i,j] # action by permuting rows and colums/conjugation
|
|
||||||
end
|
|
||||||
end
|
|
||||||
return result
|
|
||||||
end
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
# Action of WreathProductElems on AutGroupElem
|
# Action of WreathProductElems on AutGroupElem
|
||||||
|
Loading…
Reference in New Issue
Block a user