dispatch method of main is decided based on G

This commit is contained in:
kalmarek 2018-08-20 03:24:49 +02:00
parent 0cae4882f1
commit 6abb2c4186
3 changed files with 17 additions and 24 deletions

View File

@ -62,8 +62,4 @@ include("main.jl")
G = PropertyTGroups.SpecialAutomorphismGroup(PARSEDARGS)
if PARSEDARGS["nosymmetry"]
main(Standard, G)
else
main(Symmetrize, G)
end
main(G)

6
SLn.jl
View File

@ -59,8 +59,4 @@ include("main.jl")
G = PropertyTGroups.SpecialLinearGroup(PARSEDARGS)
if PARSEDARGS["nosymmetry"]
main(Standard, G)
else
main(Symmetrize, G)
end
main(G)

View File

@ -7,22 +7,22 @@ info(testdir)
mkdir(testdir)
cd(testdir)
function SL_tests(::Type{T}, args) where {T<:Union{Standard, Symmetrize}}
function SL_tests(args)
G = PropertyTGroups.SpecialLinearGroup(args)
args["p"] = 3
@test main(T, G) == true
@test main(G) == true
println("\n"*"="^30*"\n")
begin
args["p"] = 5
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(T, G) == false
@test main(G) == false
args["warmstart"] = true
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(T, G) == false
@test main(G) == false
end
println("\n"*"="^30*"\n")
@ -30,20 +30,20 @@ function SL_tests(::Type{T}, args) where {T<:Union{Standard, Symmetrize}}
begin
args["p"] = 7
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(T, G) == false
@test main(G) == false
println("\n"*"="^30*"\n")
args["upper-bound"] = 0.25
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(T, G) == false
@test main(G) == false
end
println("\n"*"="^30*"\n")
args["N"] = 3
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(T, G) == true
@test main(G) == true
println("\n"*"="^30*"\n")
@ -53,24 +53,25 @@ function SL_tests(::Type{T}, args) where {T<:Union{Standard, Symmetrize}}
args["upper-bound"] = Inf
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(T, G) == false
@test main(G) == false
args["upper-bound"] = 0.27
args["warmstart"] = true
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(T, G) == false
@test main(G) == false
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(T, G) == true
@test main(G) == true
G = PropertyTGroups.SpecialLinearGroup(args)
@test main(T, G) == true
@test main(G) == true
end
return main(T, G)
return main(G)
end
@testset "SLn's" begin
@testset "Non-Symmetrized" begin
args = Dict(
@ -86,7 +87,7 @@ end
"nosymmetry"=>true,
)
@time SL_tests(Standard, args)
SL_tests(args)
end
@testset "Symmetrized" begin
@ -104,6 +105,6 @@ end
"nosymmetry"=>false,
)
@time SL_tests(Symmetrize, args)
SL_tests(args)
end
end