From ff8fcb5dd3efc20e0b1820f6ecf71d6d94874c45 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Wed, 20 Nov 2019 13:49:16 +0100 Subject: [PATCH] fix names and tests --- Manifest.toml | 6 +++--- src/1712.07167.jl | 4 +--- test/1712.07167.jl | 28 +++++++++++++++++----------- test/SOS_correctness.jl | 6 +++--- 4 files changed, 24 insertions(+), 20 deletions(-) diff --git a/Manifest.toml b/Manifest.toml index 0bd3d27..84f504a 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -124,7 +124,7 @@ version = "0.10.6" [[GroupRings]] deps = ["AbstractAlgebra", "LinearAlgebra", "Markdown", "SparseArrays"] -git-tree-sha1 = "0953bbaa3ccd0b7e12585e705011f01ac8672c7c" +git-tree-sha1 = "8a9541783cff6911e35840770d0f004c0d2a13dd" repo-rev = "master" repo-url = "https://github.com/kalmarek/GroupRings.jl" uuid = "0befed6a-bd73-11e8-1e41-a1190947c2f5" @@ -230,9 +230,9 @@ version = "0.12.0" [[Parsers]] deps = ["Dates", "Test"] -git-tree-sha1 = "c56ecb484f286639f161e712b8311f5ab77e8d32" +git-tree-sha1 = "a23968e107c0544aca91bfab6f7dd34de1206a54" uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" -version = "0.3.8" +version = "0.3.9" [[Pkg]] deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"] diff --git a/src/1712.07167.jl b/src/1712.07167.jl index 44d1bcf..ac9d707 100644 --- a/src/1712.07167.jl +++ b/src/1712.07167.jl @@ -43,10 +43,8 @@ function Settings(name::String, return Symmetrized(name, G, S, autS, halfradius, upper_bound, solver, force_compute) end -prefix(s::Naive) = "" -prefix(s::Symmetrized) = "o" suffix(s::Settings) = "$(s.upper_bound)" -prepath(s::Settings) = prefix(s)*s.name +prepath(s::Settings) = s.name fullpath(s::Settings) = joinpath(prepath(s), suffix(s)) filename(sett::Settings, s::Symbol; kwargs...) = filename(sett, Val{s}; kwargs...) diff --git a/test/1712.07167.jl b/test/1712.07167.jl index d2ac53f..7c807f2 100644 --- a/test/1712.07167.jl +++ b/test/1712.07167.jl @@ -1,13 +1,15 @@ @testset "1712.07167 Examples" begin - @testset "oSL(3,Z)" begin + @testset "SL(3,Z)" begin N = 3 G = MatrixAlgebra(zz, N) S = PropertyT.generating_set(G) autS = WreathProduct(PermGroup(2), PermGroup(N)) - rm("oSL($N,Z)", recursive=true, force=true) - sett = PropertyT.Settings("SL($N,Z)", G, S, autS, with_SCS(1000, accel=20); + NAME = "SL($N,Z)_orbit" + + rm(NAME, recursive=true, force=true) + sett = PropertyT.Settings(NAME, G, S, autS, with_SCS(1000, accel=20); upper_bound=0.27, force_compute=false) @info sett @@ -20,7 +22,7 @@ @test λ == PropertyT.spectral_gap(sett) @test PropertyT.check_property_T(sett) == false - sett = PropertyT.Settings("SL($N,Z)", G, S, autS, with_SCS(4000, accel=20); + sett = PropertyT.Settings(NAME, G, S, autS, with_SCS(4000, accel=20); upper_bound=0.27, force_compute=true) @info sett @@ -36,7 +38,7 @@ ########## # Symmetrizing by PermGroup(3): - sett = PropertyT.Settings("SL($N,Z)", G, S, PermGroup(N), with_SCS(4000, accel=20, warm_start=false); + sett = PropertyT.Settings(NAME, G, S, PermGroup(N), with_SCS(4000, accel=20, warm_start=false); upper_bound=0.27, force_compute=true) @info sett @@ -46,14 +48,16 @@ @test PropertyT.interpret_results(sett, λ) == true end - @testset "oSL(4,Z)" begin + @testset "SL(4,Z)" begin N = 4 G = MatrixAlgebra(zz, N) S = PropertyT.generating_set(G) autS = WreathProduct(PermGroup(2), PermGroup(N)) - rm("oSL($N,Z)", recursive=true, force=true) - sett = PropertyT.Settings("SL($N,Z)", G, S, autS, with_SCS(2000, accel=20); + NAME = "SL($N,Z)_orbit" + + rm(NAME, recursive=true, force=true) + sett = PropertyT.Settings(NAME, G, S, autS, with_SCS(2000, accel=20); upper_bound=1.3, force_compute=false) @info sett @@ -66,7 +70,7 @@ @test λ == PropertyT.spectral_gap(sett) @test PropertyT.check_property_T(sett) == false - sett = PropertyT.Settings("SL($N,Z)", G, S, autS, with_SCS(15000, accel=20, warm_start=true); + sett = PropertyT.Settings(NAME, G, S, autS, with_SCS(15000, accel=20, warm_start=true); upper_bound=1.3, force_compute=true) @info sett @@ -86,9 +90,11 @@ S = PropertyT.generating_set(G) autS = WreathProduct(PermGroup(2), PermGroup(N)) - rm("oSAut(F$N)", recursive=true, force=true) + NAME = "SAut(F$N)_orbit" - sett = PropertyT.Settings("SAut(F$N)", G, S, autS, with_SCS(1000); + rm(NAME, recursive=true, force=true) + + sett = PropertyT.Settings(NAME, G, S, autS, with_SCS(1000); upper_bound=0.15) @info sett diff --git a/test/SOS_correctness.jl b/test/SOS_correctness.jl index 28d2b3d..c13abe2 100644 --- a/test/SOS_correctness.jl +++ b/test/SOS_correctness.jl @@ -27,7 +27,7 @@ @info "$NAME:\nDifference in l₁-norm between square and hpc sos decompositions:" norm(eoi-sos_sqr,1) norm(eoi-sos_hpc,1) norm(sos_sqr - sos_hpc, 1) ######################################################### - NAME = "oSL(3,Z)" + NAME = "SL(3,Z)_orbit" eoi, pm, Q = prepare(NAME, 0.27, 3*2*2) @time sos_sqr = PropertyT.compute_SOS_square(pm, Q) @@ -37,7 +37,7 @@ @info "$NAME:\nDifference in l₁-norm between square and hpc sos decompositions:" norm(eoi-sos_sqr,1) norm(eoi-sos_hpc,1) norm(sos_sqr - sos_hpc, 1) ######################################################### - NAME = "oSL(4,Z)" + NAME = "SL(4,Z)_orbit" eoi, pm, Q = prepare(NAME, 1.3, 4*3*2) @time sos_sqr = PropertyT.compute_SOS_square(pm, Q) @@ -47,7 +47,7 @@ @info "$NAME:\nDifference in l₁-norm between square and hpc sos decompositions:" norm(eoi-sos_sqr,1) norm(eoi-sos_hpc,1) norm(sos_sqr - sos_hpc, 1) ######################################################### - NAME = "oSAut(F3)" + NAME = "SAut(F3)_orbit" eoi, pm, Q = prepare(NAME, 0.15, 4*3*2*2) @time sos_sqr = PropertyT.compute_SOS_square(pm, Q)