no more @showprogress

This commit is contained in:
kalmar 2017-06-08 16:49:10 +02:00
parent 04b7622840
commit acae7322aa

View File

@ -10,37 +10,10 @@ using PropertyT
import Nemo.elements
using JLD
using ProgressMeter
import Base.convert
convert(::Type{Int}, x::Nemo.fmpz) = x.d
function products{T<:GroupElem}(X::AbstractVector{T}, Y::AbstractVector{T})
result = Vector{T}()
seen = Set{T}()
@showprogress for x in X
for y in Y
z = x*y
if !in(z, seen)
push!(seen, z)
push!(result, z)
end
end
end
return result
end
function generate_balls{T<:GroupElem}(S::Vector{T}, Id::T; radius=2)
sizes = Vector{Int}()
S = unshift!(S, Id)
B = [Id]
for i in 1:radius
B = products(B, S);
push!(sizes, length(B))
end
return B, sizes
end
function elements(F::Nemo.FqNmodFiniteField)
deg = Int(degree(F))
char = Int(characteristic(F))
@ -77,7 +50,7 @@ function orbit_decomposition(G::Nemo.Group, E::Vector, rdict=GroupRings.reverse_
tovisit = trues(E);
orbits = Vector{Set{Int}}()
@showprogress "Orbit decomposition... " for i in 1:endof(E)
for i in 1:endof(E)
if tovisit[i]
orbit = Set{Int}()
a = E[i]
@ -101,11 +74,6 @@ function matrix_repr(g::WreathProductElem, E, E_dict)
return rep_matrix
end
function action_mreps(G::Nemo.Group, E, E_dict)
result = @showprogress [matrix_repr(g, E, E_dict) for g in elements(G)]
return result
end
function chars(G::PermutationGroup)
permtype_unsorted(σ::Nemo.perm) = [length(c) for c in cycles(σ)]
permtype(σ::Nemo.perm) = sort(permtype_unsorted(σ))
@ -243,7 +211,7 @@ end
function Uπ_matrices(P_matrices; orth=orthSVD)
U_p_matrices = Vector{Array{Float64,2}}()
@showprogress "Computing Uπ mats..." for (i,p_mat) in enumerate(P_matrices)
for (i,p_mat) in enumerate(P_matrices)
U_p = orth(p_mat)
push!(U_p_matrices, U_p)
end
@ -254,7 +222,7 @@ function compute_orbit_data{T<:GroupElem}(logger, name::String, G::Group, S::Vec
isdir(name) || mkdir(name)
info(logger, "Generating ball of radius 4")
@time E4, sizes = generate_balls(S, G(), radius=2*radius);
@time E4, sizes = Groups.generate_balls(S, G(), radius=2*radius);
info(logger, "Reverse dict")
@time E_dict = GroupRings.reverse_dict(E4)
@ -277,12 +245,12 @@ function compute_orbit_data{T<:GroupElem}(logger, name::String, G::Group, S::Vec
info(logger, "Action matrices")
E2 = E4[1:sizes[radius]]
@time BNactionE_mreps = action_mreps(BN, E2, E_dict)
@time BNactionE_mreps = [matrix_repr(g, E2, E_dict) for g in elements(BN)]
info(logger, "Projections")
@time BN_mps = rankOne_projections(BN);
@time π_E_projections = @showprogress [Cstar_repr(p, BNactionE_mreps) for p in BN_mps]
@time π_E_projections = [Cstar_repr(p, BNactionE_mreps) for p in BN_mps]
info(logger, "Uπs...")
@time Uπs = Uπ_matrices(π_E_projections);