use radius parameter

This commit is contained in:
kalmar 2017-03-31 22:40:31 +02:00
parent 4f37db5bde
commit 9697bdc71d
1 changed files with 21 additions and 9 deletions

30
SL.jl
View File

@ -45,20 +45,22 @@ function products{T}(U::AbstractVector{T}, V::AbstractVector{T})
return unique(result)
end
function ΔandSDPconstraints(Id, S; radius::Int=4)
k = div(radius,2)
lengths = Vector{Int}()
function ΔandSDPconstraints(Id, S, radius)
radius *=2
sizes = Vector{Int}()
S = vcat([Id], S)
B = S
push!(lengths,length(B))
push!(sizes,length(B))
for i in 2:radius
B = products(S, B);
push!(lengths, length(B))
push!(sizes, length(B))
end
println("Generated balls of sizes $sizes")
k = div(radius,2)
basis = B[1:lengths[k]]
basis = B[1:sizes[k]]
product_matrix = PropertyT.create_product_matrix(B,lengths[k]);
product_matrix = PropertyT.create_product_matrix(B, sizes[k]);
sdp_constraints = PropertyT.constraints_from_pm(product_matrix, length(B))
L_coeff = PropertyT.splaplacian_coeff(S, basis, length(B));
Δ = GroupAlgebraElement(L_coeff, product_matrix)
@ -113,6 +115,10 @@ function parse_commandline()
help = "Matrices over filed of p-elements (default: p=0 => over ZZ)"
arg_type = Int
default = 0
"--radius"
help = "Find the decomposition over B_r(e,S)"
arg_type = Int
default = 0
end
return parse_args(s)
@ -136,7 +142,13 @@ function main()
else
name = "SL$(N)_$p"
end
name = name*"-$(string(upper_bound))"
radius = parsed_args["radius"]
if radius == 0
name*"-$(string(upper_bound))"
radius = 2
else
name = name*"-$(string(upper_bound))-r=$radius"
end
S() = SL_generatingset(N, p)
if parsed_args["cpus"] nothing
@ -145,7 +157,7 @@ function main()
end
Blas.set_num_threads(parsed_args["cpus"])
end
@time PropertyT.check_property_T(name, S, solver, upper_bound, tol)
@time PropertyT.check_property_T(name, S, solver, upper_bound, tol, radius)
return 0
end