1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-22 16:05:27 +01:00

make orbit decomposition slightly faster by allocating orbit only once

This commit is contained in:
kalmarek 2018-03-22 10:52:53 +01:00
parent db455df852
commit e5b4b9220b

View File

@ -52,12 +52,13 @@ function orbit_decomposition(G::Nemo.Group, E::Vector, rdict=GroupRings.reverse_
tovisit = trues(E);
orbits = Vector{Vector{Int}}()
orbit = zeros(Int, length(elts))
for i in 1:endof(E)
if tovisit[i]
orbit = zeros(Int, length(elts))
a = E[i]
Threads.@threads for i in 1:length(elts)
orbit[i] = rdict[elts[i](a)]
g = E[i]
Threads.@threads for j in 1:length(elts)
orbit[j] = rdict[elts[j](g)]
end
tovisit[orbit] = false
push!(orbits, unique(orbit))