indentation and cosmetics

This commit is contained in:
kalmarek 2018-01-04 22:09:53 +01:00
parent 76ff889366
commit 2ae11d9f33
2 changed files with 24 additions and 26 deletions

8
SL.jl
View File

@ -48,11 +48,9 @@ function parse_commandline()
return parse_args(settings)
end
const PARSEDARGS = parse_commandline()
include("CPUselect.jl")
# set_parallel_mthread(PARSEDARGS, workers=true)
using SCS.SCSSolver
@ -71,7 +69,7 @@ function main(GROUP, parsed_args)
warm = parsed_args["warmstart"]
name, N = GROUP.groupname(parsed_args)
G, S = G, S = GROUP.generatingset(parsed_args)
G, S = GROUP.generatingset(parsed_args)
name = "$(name)_r$radius"
isdir(name) || mkdir(name)
@ -82,10 +80,10 @@ function main(GROUP, parsed_args)
info(logger, "Iterations: $iterations")
info(logger, "Precision: $tol")
info(logger, "Upper bound: $upper_bound")
info(logger, "Threads: $(Threads.nthreads())")
info(logger, "Workers: $(workers())")
info(logger, G)
info(logger, "Symmetric generating set of size $(length(S))")
info(logger, "Threads: $(Threads.nthreads())")
info(logger, "Workers: $(workers())")
Id = one(G)

42
SLNs.jl
View File

@ -29,15 +29,15 @@ function SLsize(n,p)
end
function generatingset(n::Int, X::Bool=false)
indexing = [(i,j) for i in 1:n for j in 1:n if i≠j]
G = MatrixSpace(ZZ, n, n)
if X
S = [E(i,j,G,v) for (i,j) in indexing for v in [1, 100]]
else
S = [E(i,j,G,v) for (i,j) in indexing for v in [1]]
end
S = vcat(S, [inv(x) for x in S])
return G, unique(S)
indexing = [(i,j) for i in 1:n for j in 1:n if i≠j]
G = MatrixSpace(ZZ, n, n)
if X
S = [E(i,j,G,v) for (i,j) in indexing for v in [1, 100]]
else
S = [E(i,j,G,v) for (i,j) in indexing for v in [1]]
end
S = vcat(S, [inv(x) for x in S])
return G, unique(S)
end
function generatingset(n::Int, p::Int, X::Bool=false)
@ -52,15 +52,15 @@ function generatingset(n::Int, p::Int, X::Bool=false)
end
function generatingset(parsed_args)
N = parsed_args["N"]
p = parsed_args["p"]
X = parsed_args["X"]
N = parsed_args["N"]
p = parsed_args["p"]
X = parsed_args["X"]
if p == 0
return generatingset(N, X)
else
return generatingset(N, p, X)
end
if p == 0
return generatingset(N, X)
else
return generatingset(N, p, X)
end
end
###############################################################################
@ -101,11 +101,11 @@ end
###############################################################################
function groupname(parsed_args)
N = parsed_args["N"]
p = parsed_args["p"]
X = parsed_args["X"]
N = parsed_args["N"]
p = parsed_args["p"]
X = parsed_args["X"]
return groupname(N, p, X), N
return groupname(N, p, X), N
end
function groupname(N::Int, p::Int=0, X::Bool=false)