Small bug fixed
This commit is contained in:
parent
54bd6c20f4
commit
56a8808938
40
irrep.jl
40
irrep.jl
|
|
@ -2,24 +2,32 @@ using DelimitedFiles
|
||||||
rotations = readdlm("rotations.mat", ',', Int, '\n')
|
rotations = readdlm("rotations.mat", ',', Int, '\n')
|
||||||
rotations = reshape(rotations, (24, 3, 3))
|
rotations = reshape(rotations, (24, 3, 3))
|
||||||
|
|
||||||
N = 24
|
function get_A1_labels(N::Int)
|
||||||
ks = -N÷2:N÷2-1
|
rotations = readdlm("rotations.csv", ',', Int, '\n')
|
||||||
lattice = hcat((collect.(Iterators.product(ks, ks, ks)))...)
|
rotations = reshape(rotations, (24, 3, 3))
|
||||||
labels = reshape(collect(1:N^3), (N, N, N))
|
|
||||||
|
ks = -N÷2:N÷2-1
|
||||||
for r in 1:24
|
lattice = hcat((collect.(Iterators.product(ks, ks, ks)))...)
|
||||||
rotated_lattice = Matrix(rotations[r, :, :]) * lattice
|
labels = reshape(collect(1:N^3), (N, N, N))
|
||||||
for index in 1:N^3
|
|
||||||
rotated_lattice_point = rotated_lattice[:, index]
|
for r in 1:24
|
||||||
(i, j, k) = mod1.(rotated_lattice_point .+ (N÷2 + 1), N)
|
rotated_lattice = Matrix(rotations[r, :, :]) * lattice
|
||||||
old_label = max(labels[index], labels[i, j, k])
|
for index in 1:N^3
|
||||||
new_label = min(labels[index], labels[i, j, k])
|
rotated_lattice_point = rotated_lattice[:, index]
|
||||||
if old_label != new_label
|
(i, j, k) = mod1.(rotated_lattice_point .+ (N÷2 + 1), N)
|
||||||
for o in findall(isequal(old_label), labels)
|
old_label = max(labels[index], labels[i, j, k])
|
||||||
labels[o] = new_label
|
new_label = min(labels[index], labels[i, j, k])
|
||||||
|
if old_label != new_label
|
||||||
|
for o in findall(isequal(old_label), labels)
|
||||||
|
labels[o] = new_label
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
return labels
|
||||||
end
|
end
|
||||||
|
|
||||||
unique(labels)
|
function sym_reduce(N::Int, K_full)
|
||||||
|
|
||||||
|
end
|
||||||
Loading…
Reference in New Issue