mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-19 15:25:29 +01:00
Introduce {Perm,DirectProd}Character <: AbstractCharacter <: Function
This commit is contained in:
parent
b89598c67c
commit
536542c3a6
@ -1,11 +1,28 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
# Character of DirectProducts
|
# Characters of Symmetric Group and DirectProduct
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
function epsilon(i, g::DirectProductGroupElem)
|
abstract AbstractCharacter <: Function
|
||||||
return reduce(*, 1, ((-1)^isone(g.elts[j]) for j in 1:i))
|
|
||||||
|
immutable PermCharacter <: AbstractCharacter
|
||||||
|
p::Partition
|
||||||
|
end
|
||||||
|
|
||||||
|
immutable DirectProdCharacter <: AbstractCharacter
|
||||||
|
i::Int
|
||||||
|
end
|
||||||
|
|
||||||
|
function (chi::PermCharacter)(g::Nemo.perm)
|
||||||
|
R = Nemo.partitionseq(chi.p)
|
||||||
|
p = Partition(Nemo.permtype(g))
|
||||||
|
return Int(Nemo.MN1inner(R, p, 1, Nemo._charvalsTable))
|
||||||
|
end
|
||||||
|
|
||||||
|
## NOTE: this works only for Z/2!!!!
|
||||||
|
function (chi::DirectProdCharacter)(g::DirectProductGroupElem)
|
||||||
|
return reduce(*, 1, ((-1)^isone(g.elts[j]) for j in 1:chi.i))
|
||||||
end
|
end
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user