mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2025-01-03 12:15:27 +01:00
remove .func field from autsymbol
This commit is contained in:
parent
30f44cca71
commit
54e8eb0b43
@ -8,7 +8,6 @@ immutable AutSymbol <: GSymbol
|
||||
str::String
|
||||
pow::Int
|
||||
ex::Expr
|
||||
func::Function
|
||||
end
|
||||
|
||||
typealias AutGroupElem GWord{AutSymbol}
|
||||
@ -60,23 +59,23 @@ function subscriptify(n::Int)
|
||||
end
|
||||
|
||||
function id_autsymbol()
|
||||
return AutSymbol("(id)", 0, :(id()), identity)
|
||||
return AutSymbol("(id)", 0, :(id()))
|
||||
end
|
||||
|
||||
function rmul_autsymbol(i, j; pow::Int=1)
|
||||
str = "ϱ"*subscriptify(i)*subscriptify(j)
|
||||
return AutSymbol(str, pow, :(ϱ($i, $j, $pow)), ϱ(i, j, pow))
|
||||
return AutSymbol(str, pow, :(ϱ($i, $j, $pow)))
|
||||
end
|
||||
|
||||
function lmul_autsymbol(i, j; pow::Int=1)
|
||||
str = "λ"*subscriptify(i)*subscriptify(j)
|
||||
return AutSymbol(str, pow, :(λ($i, $j, $pow)), λ(i, j, pow))
|
||||
return AutSymbol(str, pow, :(λ($i, $j, $pow)))
|
||||
end
|
||||
|
||||
function flip_autsymbol(i; pow::Int=1)
|
||||
str = "ɛ"*subscriptify(i)
|
||||
pow = (2+pow%2)%2
|
||||
return AutSymbol(str, pow, :(ɛ($i, $pow)), ɛ(i, pow))
|
||||
return AutSymbol(str, pow, :(ɛ($i, $pow)))
|
||||
end
|
||||
|
||||
function perm_autsymbol(p::perm; pow::Int=1)
|
||||
@ -85,7 +84,7 @@ function perm_autsymbol(p::perm; pow::Int=1)
|
||||
else
|
||||
p = p^pow
|
||||
str = "σ"*join([subscriptify(i) for i in p.d])
|
||||
return AutSymbol(str, 1, :(σ($(p.d), 1)), σ(p, 1))
|
||||
return AutSymbol(str, 1, :(σ($(p.d), 1)))
|
||||
end
|
||||
end
|
||||
|
||||
@ -200,7 +199,7 @@ function change_pow(s::AutSymbol, n::Int)
|
||||
return s
|
||||
else
|
||||
warn("Changing power of an unknown type of symbol! $s")
|
||||
return AutSymbol(s.str, n, s.ex, s.func)
|
||||
return AutSymbol(s.str, n, s.ex)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
@testset "AutSymbol" begin
|
||||
@test_throws MethodError Groups.AutSymbol("a")
|
||||
@test_throws MethodError Groups.AutSymbol("a", 1)
|
||||
f = Groups.AutSymbol("a", 1, :(a()), v -> v)
|
||||
f = Groups.AutSymbol("a", 1, :(a()))
|
||||
@test isa(f, Groups.GSymbol)
|
||||
@test isa(f, Groups.AutSymbol)
|
||||
@test isa(Groups.perm_autsymbol(G([1,2,3,4])), Groups.AutSymbol)
|
||||
@ -83,7 +83,7 @@
|
||||
end
|
||||
|
||||
@testset "AutGroup/AutGroupElem constructors" begin
|
||||
f = Groups.AutSymbol("a", 1, :(a()), v -> v)
|
||||
f = Groups.AutSymbol("a", 1, :(a()))
|
||||
@test isa(AutGroupElem(f), Groups.GWord)
|
||||
@test isa(AutGroupElem(f), AutGroupElem)
|
||||
@test isa(AutGroup(FreeGroup(3)), Nemo.Group)
|
||||
|
Loading…
Reference in New Issue
Block a user