indentation and cosmetics
This commit is contained in:
parent
76ff889366
commit
2ae11d9f33
8
SL.jl
8
SL.jl
@ -48,11 +48,9 @@ function parse_commandline()
|
|||||||
|
|
||||||
return parse_args(settings)
|
return parse_args(settings)
|
||||||
end
|
end
|
||||||
|
|
||||||
const PARSEDARGS = parse_commandline()
|
const PARSEDARGS = parse_commandline()
|
||||||
|
|
||||||
include("CPUselect.jl")
|
include("CPUselect.jl")
|
||||||
|
|
||||||
# set_parallel_mthread(PARSEDARGS, workers=true)
|
# set_parallel_mthread(PARSEDARGS, workers=true)
|
||||||
|
|
||||||
using SCS.SCSSolver
|
using SCS.SCSSolver
|
||||||
@ -71,7 +69,7 @@ function main(GROUP, parsed_args)
|
|||||||
warm = parsed_args["warmstart"]
|
warm = parsed_args["warmstart"]
|
||||||
|
|
||||||
name, N = GROUP.groupname(parsed_args)
|
name, N = GROUP.groupname(parsed_args)
|
||||||
G, S = G, S = GROUP.generatingset(parsed_args)
|
G, S = GROUP.generatingset(parsed_args)
|
||||||
|
|
||||||
name = "$(name)_r$radius"
|
name = "$(name)_r$radius"
|
||||||
isdir(name) || mkdir(name)
|
isdir(name) || mkdir(name)
|
||||||
@ -82,10 +80,10 @@ function main(GROUP, parsed_args)
|
|||||||
info(logger, "Iterations: $iterations")
|
info(logger, "Iterations: $iterations")
|
||||||
info(logger, "Precision: $tol")
|
info(logger, "Precision: $tol")
|
||||||
info(logger, "Upper bound: $upper_bound")
|
info(logger, "Upper bound: $upper_bound")
|
||||||
info(logger, "Threads: $(Threads.nthreads())")
|
|
||||||
info(logger, "Workers: $(workers())")
|
|
||||||
info(logger, G)
|
info(logger, G)
|
||||||
info(logger, "Symmetric generating set of size $(length(S))")
|
info(logger, "Symmetric generating set of size $(length(S))")
|
||||||
|
info(logger, "Threads: $(Threads.nthreads())")
|
||||||
|
info(logger, "Workers: $(workers())")
|
||||||
|
|
||||||
Id = one(G)
|
Id = one(G)
|
||||||
|
|
||||||
|
42
SLNs.jl
42
SLNs.jl
@ -29,15 +29,15 @@ function SLsize(n,p)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function generatingset(n::Int, X::Bool=false)
|
function generatingset(n::Int, X::Bool=false)
|
||||||
indexing = [(i,j) for i in 1:n for j in 1:n if i≠j]
|
indexing = [(i,j) for i in 1:n for j in 1:n if i≠j]
|
||||||
G = MatrixSpace(ZZ, n, n)
|
G = MatrixSpace(ZZ, n, n)
|
||||||
if X
|
if X
|
||||||
S = [E(i,j,G,v) for (i,j) in indexing for v in [1, 100]]
|
S = [E(i,j,G,v) for (i,j) in indexing for v in [1, 100]]
|
||||||
else
|
else
|
||||||
S = [E(i,j,G,v) for (i,j) in indexing for v in [1]]
|
S = [E(i,j,G,v) for (i,j) in indexing for v in [1]]
|
||||||
end
|
end
|
||||||
S = vcat(S, [inv(x) for x in S])
|
S = vcat(S, [inv(x) for x in S])
|
||||||
return G, unique(S)
|
return G, unique(S)
|
||||||
end
|
end
|
||||||
|
|
||||||
function generatingset(n::Int, p::Int, X::Bool=false)
|
function generatingset(n::Int, p::Int, X::Bool=false)
|
||||||
@ -52,15 +52,15 @@ function generatingset(n::Int, p::Int, X::Bool=false)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function generatingset(parsed_args)
|
function generatingset(parsed_args)
|
||||||
N = parsed_args["N"]
|
N = parsed_args["N"]
|
||||||
p = parsed_args["p"]
|
p = parsed_args["p"]
|
||||||
X = parsed_args["X"]
|
X = parsed_args["X"]
|
||||||
|
|
||||||
if p == 0
|
if p == 0
|
||||||
return generatingset(N, X)
|
return generatingset(N, X)
|
||||||
else
|
else
|
||||||
return generatingset(N, p, X)
|
return generatingset(N, p, X)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -101,11 +101,11 @@ end
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
function groupname(parsed_args)
|
function groupname(parsed_args)
|
||||||
N = parsed_args["N"]
|
N = parsed_args["N"]
|
||||||
p = parsed_args["p"]
|
p = parsed_args["p"]
|
||||||
X = parsed_args["X"]
|
X = parsed_args["X"]
|
||||||
|
|
||||||
return groupname(N, p, X), N
|
return groupname(N, p, X), N
|
||||||
end
|
end
|
||||||
|
|
||||||
function groupname(N::Int, p::Int=0, X::Bool=false)
|
function groupname(N::Int, p::Int=0, X::Bool=false)
|
||||||
|
Loading…
Reference in New Issue
Block a user