mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-11-19 14:35:28 +01:00
rename fieldname gen -> str
This commit is contained in:
parent
90437139cb
commit
c5ec6bb15e
@ -9,7 +9,7 @@ import Base: convert
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
immutable AutSymbol <: GSymbol
|
immutable AutSymbol <: GSymbol
|
||||||
gen::String
|
str::String
|
||||||
pow::Int
|
pow::Int
|
||||||
ex::Expr
|
ex::Expr
|
||||||
func::Function
|
func::Function
|
||||||
@ -68,27 +68,28 @@ function id_autsymbol()
|
|||||||
end
|
end
|
||||||
|
|
||||||
function rmul_autsymbol(i, j; pow::Int=1)
|
function rmul_autsymbol(i, j; pow::Int=1)
|
||||||
gen = "ϱ"*subscriptify(i)*subscriptify(j)
|
str = "ϱ"*subscriptify(i)*subscriptify(j)
|
||||||
return AutSymbol(gen, pow, :(ϱ($i, $j, $pow)), ϱ(i, j, pow))
|
return AutSymbol(str, pow, :(ϱ($i, $j, $pow)), ϱ(i, j, pow))
|
||||||
end
|
end
|
||||||
|
|
||||||
function lmul_autsymbol(i, j; pow::Int=1)
|
function lmul_autsymbol(i, j; pow::Int=1)
|
||||||
gen = "λ"*subscriptify(i)*subscriptify(j)
|
str = "λ"*subscriptify(i)*subscriptify(j)
|
||||||
return AutSymbol(gen, pow, :(λ($i, $j, $pow)), λ(i, j, pow))
|
return AutSymbol(str, pow, :(λ($i, $j, $pow)), λ(i, j, pow))
|
||||||
end
|
end
|
||||||
|
|
||||||
function flip_autsymbol(i; pow::Int=1)
|
function flip_autsymbol(i; pow::Int=1)
|
||||||
gen = "ɛ"*subscriptify(i)
|
str = "ɛ"*subscriptify(i)
|
||||||
pow = (2+pow%2)%2
|
pow = (2+pow%2)%2
|
||||||
return AutSymbol(gen, pow, :(ɛ($i, $pow)), ɛ(i, pow))
|
return AutSymbol(str, pow, :(ɛ($i, $pow)), ɛ(i, pow))
|
||||||
end
|
end
|
||||||
|
|
||||||
function perm_autsymbol(p::perm; pow::Int=1)
|
function perm_autsymbol(p::perm; pow::Int=1)
|
||||||
if p == parent(p)()
|
if p == parent(p)()
|
||||||
return id_autsymbol()
|
return id_autsymbol()
|
||||||
else
|
else
|
||||||
gen = "σ"*join([subscriptify(i) for i in p.d])
|
str = "σ"*join([subscriptify(i) for i in p.d])
|
||||||
return AutSymbol(gen, 1, :(σ($(p.d), 1)), σ(p, 1))
|
p = p^pow
|
||||||
|
return AutSymbol(str, 1, :(σ($(p.d), 1)), σ(p, 1))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -150,7 +151,7 @@ end
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
hash(s::AutSymbol, h::UInt) = hash(s.gen, hash(s.pow, hash(:AutSymbol, h)))
|
hash(s::AutSymbol, h::UInt) = hash(s.str, hash(s.pow, hash(:AutSymbol, h)))
|
||||||
|
|
||||||
function change_pow(s::AutSymbol, n::Int)
|
function change_pow(s::AutSymbol, n::Int)
|
||||||
if n == 0
|
if n == 0
|
||||||
@ -188,7 +189,7 @@ generators(G::AutGroup) = [G(AutGroupElem(elt)) for elt in G.generators]
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
(==)(s::AutSymbol, t::AutSymbol) = s.gen == t.gen && s.pow == t.pow
|
(==)(s::AutSymbol, t::AutSymbol) = s.str == t.str && s.pow == t.pow
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user