diff --git a/src/algorithms/rings.jl b/src/algorithms/rings.jl index 54da522..55793c4 100644 --- a/src/algorithms/rings.jl +++ b/src/algorithms/rings.jl @@ -25,7 +25,7 @@ ConstMiniBitSet(l::AbstractVector{<:Integer}) = ConstMiniBitSet{UInt64}(l) push(x::ConstMiniBitSet{T}, i::Integer) where {T} = _constminibitset(x.x | (one(T) << (i % UInt8))) Base.union(x::ConstMiniBitSet, y::ConstMiniBitSet) = _constminibitset(x.x | y.x) Base.intersect(x::ConstMiniBitSet, y::ConstMiniBitSet) = _constminibitset(x.x & y.x) -Base.in(x::ConstMiniBitSet{T}, i::Integer) where {T} = ((x.x >> (i % UInt8)) & one(T)) % Bool +Base.in(i::Integer, x::ConstMiniBitSet{T}) where {T} = ((x.x >> (i % UInt8)) & one(T)) % Bool Base.setdiff(x::ConstMiniBitSet, y::ConstMiniBitSet) = _constminibitset(x.x & ~y.x) Base.symdiff(x::ConstMiniBitSet, y::ConstMiniBitSet) = _constminibitset(x.x ⊻ y.x) Base.length(x::ConstMiniBitSet) = count_ones(x.x) @@ -67,7 +67,6 @@ struct JunctionNode end JunctionNode() = JunctionNode(Int[], -one(SmallIntType), ConstMiniBitSet{UInt32}()) JunctionNode(head::Integer, num, roots::ConstMiniBitSet) = JunctionNode(Int[head], num, roots) -JunctionNode(num::Integer, ::Nothing) = JunctionNode(Int[], num, ConstMiniBitSet{UInt32}()) JunctionNode(root::Integer) = JunctionNode(1, zero(SmallIntType), ConstMiniBitSet{UInt32}(root)) function Base.show(io::IO, x::JunctionNode) @@ -1039,7 +1038,7 @@ Base.length(ras::RingAttributions) = length(ras.attrs) Base.eltype(::Type{RingAttributions{D}}) where {D} = RingIncluding{D} function Base.show(io::IO, ras::RingAttributions) - println(io, typeof(ras), "(rings per node:", length.(ras.attrs), ')') + println(io, typeof(ras), "(rings per node: ", length.(ras.attrs), ')') end struct RingIncluding{D} @@ -1053,7 +1052,7 @@ function Base.getindex(ri::RingIncluding{D}, j::Integer) where {D} return PeriodicNeighborList{D}(.-ofs, newring) end Base.length(ri::RingIncluding) = length(ri.ras.attrs[ri.i]) -Base.eltype(::Type{RingIncluding{D}}) where {D} = PeriodicNeighborList +Base.eltype(::Type{RingIncluding{D}}) where {D} = PeriodicNeighborList{D} function Base.iterate(r::Union{RingAttributions,RingIncluding}, state=1) (state % UInt) - 1 < length(r) ? ((@inbounds r[state]), state+1) : nothing diff --git a/src/precompile.jl b/src/precompile.jl index 14d2fe2..505b96f 100644 --- a/src/precompile.jl +++ b/src/precompile.jl @@ -33,7 +33,7 @@ function _precompile_() @enforce Base.precompile(Tuple{typeof(intersect), CMBitSet{T}, CMBitSet{T}}) @enforce Base.precompile(Tuple{typeof(setdiff), CMBitSet{T}, CMBitSet{T}}) @enforce Base.precompile(Tuple{typeof(symdiff), CMBitSet{T}, CMBitSet{T}}) - @enforce Base.precompile(Tuple{typeof(in), CMBitSet{T}, Int}) + @enforce Base.precompile(Tuple{typeof(in), Int, CMBitSet{T}}) @enforce Base.precompile(Tuple{typeof(eltype), Type{CMBitSet{T}}}) @enforce Base.precompile(Tuple{typeof(length), CMBitSet{T}}) @enforce Base.precompile(Tuple{typeof(isempty), CMBitSet{T}}) @@ -48,7 +48,6 @@ function _precompile_() @enforce Base.precompile(Tuple{Type{PeriodicGraphs.JunctionNode},Int,SmallIntT,CMBitSet{T}}) end @enforce Base.precompile(Tuple{Type{PeriodicGraphs.JunctionNode}}) - @enforce Base.precompile(Tuple{Type{PeriodicGraphs.JunctionNode},Int,Nothing}) @enforce Base.precompile(Tuple{Type{PeriodicGraphs.JunctionNode},Int}) @enforce Base.precompile(Tuple{typeof(PeriodicGraphs.unsafe_incr!),Ptr{SmallIntT}}) @enforce Base.precompile(Tuple{typeof(PeriodicGraphs.symdiff_cycles), Vector{Int}, Vector{Int}}) diff --git a/test/runtests.jl b/test/runtests.jl index 004a1c2..4292356 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -2,7 +2,7 @@ using Test using Graphs using PeriodicGraphs import PeriodicGraphs: ofs, vertex_permutation, dimensionality, LoopException, extended_gcd -import StaticArrays: SVector +using StaticArrays: SVector, SMatrix # using Aqua # Aqua.test_all(PeriodicGraphs) @@ -574,6 +574,7 @@ end @test isempty(outneighbors(g, PeriodicVertex(5, (1, 0, 1)))) @test only(inneighbors(g, PeriodicVertex(1, (4, 5, 6)))) == PeriodicVertex(3, (4, 5, 7)) @test indegree(g, 2) == indegree(g, PeriodicVertex3D(2)) == outdegree(g, PeriodicVertex3D(2)) == degree(g, PeriodicVertex3D(2)) + @test string(neighbors(g, PeriodicVertex(3, (7, -9, 2)))) == string(expected_neighbors) end @testset "Vertex removal" begin @@ -669,11 +670,15 @@ end @test reduce(+, s .* λ) == d end +const cpi = PeriodicGraph("2 1 2 0 0 1 3 0 0 1 4 0 0 1 5 0 0 2 3 0 -1 2 5 1 -1 3 4 1 0 4 5 0 -1") const nab = PeriodicGraph("3 1 2 0 -1 0 1 3 0 -1 -1 1 4 -1 0 0 1 5 -1 0 -1 2 3 0 0 -1 2 4 -1 0 0 2 5 -1 0 -1 3 4 0 0 0 3 5 0 0 0 4 5 0 0 0") const lta = PeriodicGraph("3 1 3 0 0 0 1 7 0 -1 0 1 9 0 0 -1 1 21 -1 0 -1 2 4 0 0 0 2 8 0 -1 0 2 9 0 0 0 2 21 -1 0 0 3 5 0 0 0 3 10 0 0 -1 3 22 -1 0 -1 4 6 0 0 0 4 10 0 0 0 4 22 -1 0 0 5 6 0 0 0 5 11 0 0 0 5 23 -1 0 0 6 12 0 0 0 6 24 -1 0 0 7 8 0 0 0 7 11 0 0 0 7 23 -1 0 0 8 12 0 0 0 8 24 -1 0 0 9 10 0 0 0 9 16 0 -1 0 10 13 0 0 0 11 12 0 0 0 11 14 0 0 0 12 15 0 0 0 13 14 0 0 1 13 15 0 0 0 13 17 0 0 0 14 16 0 0 -1 14 18 0 0 0 15 16 0 0 0 15 19 0 0 0 16 20 0 0 0 17 18 0 0 1 17 19 0 0 0 17 22 0 0 0 18 20 0 0 -1 18 23 0 0 0 19 20 0 0 0 19 24 0 0 0 20 21 0 1 0 21 22 0 0 0 23 24 0 0 0") const mtn = PeriodicGraph("3 1 2 0 0 0 1 8 0 0 -1 1 11 0 -1 0 1 29 -1 0 0 2 7 0 0 0 2 12 0 -1 0 2 30 -1 0 0 3 5 0 0 0 3 7 0 0 0 3 9 0 0 0 3 31 -1 0 0 4 6 0 0 0 4 8 0 0 0 4 9 0 0 0 4 32 -1 0 0 5 10 0 0 -1 5 11 0 0 0 5 33 -1 0 0 6 10 0 0 0 6 12 0 0 0 6 34 -1 0 0 7 13 0 0 -1 7 15 0 0 0 8 13 0 0 0 8 16 0 0 0 9 14 0 0 0 9 17 0 0 0 10 13 0 0 0 10 18 0 0 0 11 14 0 0 0 11 20 0 0 -1 12 14 0 0 0 12 19 0 0 0 13 21 0 0 0 14 22 0 0 0 15 17 0 0 0 15 19 0 -1 0 15 23 0 0 0 16 17 0 0 0 16 20 0 -1 0 16 24 0 0 0 17 25 0 0 0 18 19 0 0 0 18 20 0 0 0 18 26 0 0 0 19 27 0 0 0 20 28 0 0 0 21 23 0 0 1 21 24 0 0 0 21 26 0 0 0 22 25 0 0 0 22 27 0 0 0 22 28 0 0 -1 23 29 0 0 0 23 33 0 -1 0 24 30 0 0 0 24 34 0 -1 0 25 29 0 0 0 25 30 0 0 0 26 31 0 0 0 26 32 0 0 0 27 31 0 0 0 27 33 0 0 0 28 32 0 0 0 28 34 0 0 0 29 32 0 0 -1 30 31 0 0 0 33 34 0 0 -1") -@testset "NAB, LTA and MTN examples" begin +@testset "cpi, NAB, LTA and MTN examples" begin + @test is_well_formed(cpi) + @test nv(cpi) == 5 && ne(cpi) == 8 + @test degree(cpi) == [4; fill(3, 4)] @test is_well_formed(nab) @test ne(nab) == 2*nv(nab) == 10 @test all(==(4), degree(nab)) @@ -686,21 +691,36 @@ const mtn = PeriodicGraph("3 1 2 0 0 0 1 8 0 0 -1 1 11 0 -1 0 1 29 -1 0 0 2 7 0 end @testset "ConstMiniBitSet" begin + CMBitSet = PeriodicGraphs.ConstMiniBitSet + @test CMBitSet() == CMBitSet{UInt64}() + @test only(CMBitSet(52)) == 52 + @test CMBitSet([3, 4]) == PeriodicGraphs.push(CMBitSet{UInt64}(4), 3) for T in (UInt32, UInt64) - CMBitSet = PeriodicGraphs.ConstMiniBitSet{T} - c = CMBitSet([2,3,13]) + c = CMBitSet{T}([2,3,13]) @test 3 ∈ c @test length(c) == 3 - @test 4 ∈ symdiff(c, CMBitSet(4)) - @test 4 == only(setdiff(CMBitSet([13, 4]), c)) - @test isempty(CMBitSet()) + @test 4 ∈ symdiff(c, CMBitSet{T}(4)) + @test 4 == only(setdiff(CMBitSet{T}([13, 4]), c)) + @test intersect(c, CMBitSet{T}([13,3,13])) == CMBitSet{T}([3,13]) + @test isempty(CMBitSet{T}()) @test collect(c) == [2, 3, 13] @test minimum(c) == 2 @test maximum(c) == 13 + @test occursin("[2, 3, 13]", string(c)) end end @testset "Ring statistics" begin + dag, vertexnums = PeriodicGraphs.arcs_list(cpi, 1, 10, nothing, Bool[0;1;1;0;0]) + @test string(dag[1]) == "JunctionNode([])" + rea = PeriodicGraphs.RingsEndingAt(dag, 12) + @test_throws MethodError length(rea) + @test isempty(rea) + dag, vertexnums = PeriodicGraphs.arcs_list(cpi, 1, 10) + rea = PeriodicGraphs.RingsEndingAt(dag, 12) + @test only(rea) == [5, 1, 4, 10, 12] + @test eltype(rea) == Vector{Int} + rings_nab = RingAttributions(nab) nab_rotated = nab[[3,1,2,4,5]] rings_nab_rotated = RingAttributions(nab_rotated) @@ -718,6 +738,11 @@ end @test sort!(length.(rings_mtn[34])) == [fill(5,5); 6; fill(10, 6)] @test sort!(length.(rings_mtn[10])) == [fill(5,6); fill(10, 9)] @test sort!(length.(rings_mtn[13])) == [fill(5,6); fill(10, 12)] + @test eltype(rings_mtn) == PeriodicGraphs.RingIncluding{3} + str_rings_mtn = string(rings_mtn) + @test occursin("rings per node: [12", str_rings_mtn) + @test occursin("15 rings containing vertex 7", string(rings_mtn[7])) + @test eltype(rings_mtn[1]) == PeriodicGraphs.PeriodicNeighborList{3} rings_lta = RingAttributions(lta) @test length(rings_lta.rings) == 113 @@ -735,49 +760,51 @@ end end +module PeriodicSymmetries # copied from PeriodicGraphEmbeddings.jl + using PeriodicGraphs, Graphs, StaticArrays -using StaticArrays + struct PeriodicSymmetry3D{T} <: PeriodicGraphs.AbstractSymmetry + vmap::SubArray{PeriodicVertex3D,1,Matrix{PeriodicVertex3D},Tuple{Base.Slice{Base.OneTo{Int}},Int},true} + rotation::SMatrix{3,3,Int,9} + translation::SVector{3,T} + end + Base.getindex(symm::PeriodicSymmetry3D, i::Integer) = symm.vmap[i].v + function Base.getindex(symm::PeriodicSymmetry3D, x::PeriodicVertex3D) + dst = symm.vmap[x.v] + _ofs = muladd(symm.rotation, x.ofs, dst.ofs) + PeriodicVertex3D(dst.v, _ofs) + end + function Base.isequal(x::PeriodicSymmetry3D{T}, y::PeriodicSymmetry3D{T}) where T + x.vmap == y.vmap && x.rotation == y.rotation && x.translation == y.translation + end -struct PeriodicSymmetry3D{T} <: PeriodicGraphs.AbstractSymmetry - vmap::SubArray{PeriodicVertex3D,1,Matrix{PeriodicVertex3D},Tuple{Base.Slice{Base.OneTo{Int}},Int},true} - rotation::SMatrix{3,3,Int,9} - translation::SVector{3,T} -end -Base.getindex(symm::PeriodicSymmetry3D, i::Integer) = symm.vmap[i].v -function Base.getindex(symm::PeriodicSymmetry3D, x::PeriodicVertex3D) - dst = symm.vmap[x.v] - _ofs = muladd(symm.rotation, x.ofs, dst.ofs) - PeriodicVertex3D(dst.v, _ofs) -end -function Base.isequal(x::PeriodicSymmetry3D{T}, y::PeriodicSymmetry3D{T}) where T - x.vmap == y.vmap && x.rotation == y.rotation && x.translation == y.translation -end + struct SymmetryGroup3D{T} <: PeriodicGraphs.AbstractSymmetryGroup{PeriodicSymmetry3D{T}} + vmaps::Matrix{PeriodicVertex3D} + rotations::Vector{SMatrix{3,3,Int,9}} + translations::Vector{SVector{3,T}} + uniquemap::Vector{Int} + uniques::Vector{Int} + hasmirror::Bool + end -struct SymmetryGroup3D{T} <: PeriodicGraphs.AbstractSymmetryGroup{PeriodicSymmetry3D{T}} - vmaps::Matrix{PeriodicVertex3D} - rotations::Vector{SMatrix{3,3,Int,9}} - translations::Vector{SVector{3,T}} - uniquemap::Vector{Int} - uniques::Vector{Int} - hasmirror::Bool -end + (s::SymmetryGroup3D)(i::Integer) = s.uniques[s.uniquemap[i]] + Base.unique(s::SymmetryGroup3D) = s.uniques + function Base.getindex(s::SymmetryGroup3D{T}, i::Integer) where {T} + PeriodicSymmetry3D{T}((@view s.vmaps[:,i]), s.rotations[i], s.translations[i]) + end + Base.iterate(s::SymmetryGroup3D, state=1) = state > length(s) ? nothing : (s[state], state+1) + Base.eltype(::Type{SymmetryGroup3D{T}}) where {T} = PeriodicSymmetry3D{T} + Base.length(s::SymmetryGroup3D) = length(s.rotations) + function Base.one(s::SymmetryGroup3D{T}) where T + n = length(s.uniquemap) + PeriodicSymmetry3D{T}((@view reshape(collect(PeriodicVertex3D.(Base.OneTo(n))), n, 1)[:,1]), + one(SMatrix{3,3,Int,9}), zero(SVector{3,T})) + end -(s::SymmetryGroup3D)(i::Integer) = s.uniques[s.uniquemap[i]] -Base.unique(s::SymmetryGroup3D) = s.uniques -function Base.getindex(s::SymmetryGroup3D{T}, i::Integer) where {T} - PeriodicSymmetry3D{T}((@view s.vmaps[:,i]), s.rotations[i], s.translations[i]) -end -Base.iterate(s::SymmetryGroup3D, state=1) = state > length(s) ? nothing : (s[state], state+1) -Base.eltype(::Type{SymmetryGroup3D{T}}) where {T} = PeriodicSymmetry3D{T} -Base.length(s::SymmetryGroup3D) = length(s.rotations) -function Base.one(s::SymmetryGroup3D{T}) where T - n = length(s.uniquemap) - PeriodicSymmetry3D{T}((@view reshape(collect(PeriodicVertex3D.(Base.OneTo(n))), n, 1)[:,1]), - one(SMatrix{3,3,Int,9}), zero(SVector{3,T})) end -const symmetries_lta = SymmetryGroup3D{Rational{Int32}}( +const symmetries_lta = PeriodicSymmetries.SymmetryGroup3D{Rational{Int32}}( PeriodicVertex3D[(4, (0,0,0)) (18, (0,0,0)) (15, (0,0,0)) (3, (0,0,0)) (2, (0,0,0)) (14, (0,0,0)) (19, (0,0,0)) (4, (0,0,0)) (1, (0,0,0)) (19, (0,0,0)) (14, (0,0,0)) (2, (0,0,0)) (3, (0,0,0)) (15, (0,0,0)) (18, (0,0,0)) (11, (0,0,0)) (24, (0,0,0)) (10, (0,0,0)) (21, (0,0,0)) (12, (0,0,0)) (23, (0,0,0)) (9, (0,0,0)) (22, (0,0,0)) (24, (0,0,0)) (11, (0,0,0)) (22, (0,0,0)) (9, (0,0,0)) (23, (0,0,0)) (12, (0,0,0)) (21, (0,0,0)) (10, (0,0,0)) (16, (0,0,0)) (17, (0,0,0)) (8, (0,0,0)) (5, (0,0,0)) (20, (0,0,0)) (13, (0,0,0)) (7, (0,0,0)) (6, (0,0,0)) (17, (0,0,0)) (16, (0,0,0)) (6, (0,0,0)) (7, (0,0,0)) (13, (0,0,0)) (20, (0,0,0)) (5, (0,0,0)) (8, (0,0,0)); (3, (0,0,0)) (19, (0,0,0)) (14, (0,0,0)) (4, (0,0,0)) (1, (0,0,0)) (15, (0,0,0)) (18, (0,0,0)) (3, (0,0,0)) (2, (0,0,0)) (18, (0,0,0)) (15, (0,0,0)) (1, (0,0,0)) (4, (0,0,0)) (14, (0,0,0)) (19, (0,0,0)) (23, (0,0,0)) (12, (0,0,0)) (22, (0,0,0)) (9, (0,0,0)) (24, (0,0,0)) (11, (0,0,0)) (21, (0,0,0)) (10, (0,0,0)) (12, (0,0,0)) (23, (0,0,0)) (10, (0,0,0)) (21, (0,0,0)) (11, (0,0,0)) (24, (0,0,0)) (9, (0,0,0)) (22, (0,0,0)) (13, (0,1,0)) (20, (0,-1,0)) (6, (0,1,0)) (7, (0,-1,0)) (17, (0,1,0)) (16, (0,-1,0)) (5, (0,1,0)) (8, (0,-1,0)) (20, (0,-1,0)) (13, (0,1,0)) (8, (0,-1,0)) (5, (0,1,0)) (16, (0,-1,0)) (17, (0,1,0)) (7, (0,-1,0)) (6, (0,1,0)); (2, (0,0,0)) (14, (0,0,0)) (19, (0,0,0)) (1, (0,0,0)) (4, (0,0,0)) (18, (0,0,0)) (15, (0,0,0)) (2, (0,0,0)) (3, (0,0,0)) (15, (0,0,0)) (18, (0,0,0)) (4, (0,0,0)) (1, (0,0,0)) (19, (0,0,0)) (14, (0,0,0)) (12, (0,0,0)) (23, (0,0,0)) (9, (0,0,0)) (22, (0,0,0)) (11, (0,0,0)) (24, (0,0,0)) (10, (0,0,0)) (21, (0,0,0)) (23, (0,0,0)) (12, (0,0,0)) (21, (0,0,0)) (10, (0,0,0)) (24, (0,0,0)) (11, (0,0,0)) (22, (0,0,0)) (9, (0,0,0)) (20, (0,0,0)) (13, (0,0,0)) (7, (0,0,0)) (6, (0,0,0)) (16, (0,0,0)) (17, (0,0,0)) (8, (0,0,0)) (5, (0,0,0)) (13, (0,0,0)) (20, (0,0,0)) (5, (0,0,0)) (8, (0,0,0)) (17, (0,0,0)) (16, (0,0,0)) (6, (0,0,0)) (7, (0,0,0)); (1, (0,0,0)) (15, (0,0,0)) (18, (0,0,0)) (2, (0,0,0)) (3, (0,0,0)) (19, (0,0,0)) (14, (0,0,0)) (1, (0,0,0)) (4, (0,0,0)) (14, (0,0,0)) (19, (0,0,0)) (3, (0,0,0)) (2, (0,0,0)) (18, (0,0,0)) (15, (0,0,0)) (24, (0,0,0)) (11, (0,0,0)) (21, (0,0,0)) (10, (0,0,0)) (23, (0,0,0)) (12, (0,0,0)) (22, (0,0,0)) (9, (0,0,0)) (11, (0,0,0)) (24, (0,0,0)) (9, (0,0,0)) (22, (0,0,0)) (12, (0,0,0)) (23, (0,0,0)) (10, (0,0,0)) (21, (0,0,0)) (17, (0,1,0)) (16, (0,-1,0)) (5, (0,1,0)) (8, (0,-1,0)) (13, (0,1,0)) (20, (0,-1,0)) (6, (0,1,0)) (7, (0,-1,0)) (16, (0,-1,0)) (17, (0,1,0)) (7, (0,-1,0)) (6, (0,1,0)) (20, (0,-1,0)) (13, (0,1,0)) (8, (0,-1,0)) (5, (0,1,0)); (8, (0,-1,0)) (11, (0,0,0)) (24, (0,0,0)) (7, (0,-1,0)) (6, (0,0,0)) (23, (0,0,0)) (12, (0,0,0)) (8, (0,-1,0)) (5, (0,0,0)) (12, (0,0,0)) (23, (0,0,0)) (6, (0,0,0)) (7, (0,-1,0)) (24, (0,0,0)) (11, (0,0,0)) (15, (0,0,0)) (18, (0,0,0)) (16, (0,-1,0)) (17, (0,0,0)) (14, (0,0,0)) (19, (0,0,0)) (13, (0,0,0)) (20, (0,-1,0)) (18, (0,0,0)) (15, (0,0,0)) (20, (0,-1,0)) (13, (0,0,0)) (19, (0,0,0)) (14, (0,0,0)) (17, (0,0,0)) (16, (0,-1,0)) (21, (0,1,0)) (10, (0,0,0)) (1, (0,1,0)) (4, (0,0,0)) (9, (0,1,0)) (22, (0,0,0)) (2, (0,1,0)) (3, (0,0,0)) (10, (0,0,0)) (21, (0,1,0)) (3, (0,0,0)) (2, (0,1,0)) (22, (0,0,0)) (9, (0,1,0)) (4, (0,0,0)) (1, (0,1,0)); (7, (0,-1,0)) (12, (0,0,0)) (23, (0,0,0)) (8, (0,-1,0)) (5, (0,0,0)) (24, (0,0,0)) (11, (0,0,0)) (7, (0,-1,0)) (6, (0,0,0)) (11, (0,0,0)) (24, (0,0,0)) (5, (0,0,0)) (8, (0,-1,0)) (23, (0,0,0)) (12, (0,0,0)) (19, (0,0,0)) (14, (0,0,0)) (20, (0,-1,0)) (13, (0,0,0)) (18, (0,0,0)) (15, (0,0,0)) (17, (0,0,0)) (16, (0,-1,0)) (14, (0,0,0)) (19, (0,0,0)) (16, (0,-1,0)) (17, (0,0,0)) (15, (0,0,0)) (18, (0,0,0)) (13, (0,0,0)) (20, (0,-1,0)) (22, (0,1,0)) (9, (0,0,0)) (3, (0,1,0)) (2, (0,0,0)) (10, (0,1,0)) (21, (0,0,0)) (4, (0,1,0)) (1, (0,0,0)) (9, (0,0,0)) (22, (0,1,0)) (1, (0,0,0)) (4, (0,1,0)) (21, (0,0,0)) (10, (0,1,0)) (2, (0,0,0)) (3, (0,1,0)); (6, (0,-1,0)) (23, (-1,0,0)) (12, (1,0,0)) (5, (0,-1,0)) (8, (0,0,0)) (11, (1,0,0)) (24, (-1,0,0)) (6, (0,-1,0)) (7, (0,0,0)) (24, (-1,0,0)) (11, (1,0,0)) (8, (0,0,0)) (5, (0,-1,0)) (12, (1,0,0)) (23, (-1,0,0)) (14, (0,0,1)) (19, (0,0,-1)) (13, (0,-1,0)) (20, (0,0,0)) (15, (0,0,-1)) (18, (0,0,1)) (16, (0,0,0)) (17, (0,-1,0)) (19, (0,0,-1)) (14, (0,0,1)) (17, (0,-1,0)) (16, (0,0,0)) (18, (0,0,1)) (15, (0,0,-1)) (20, (0,0,0)) (13, (0,-1,0)) (9, (1,1,0)) (22, (-1,0,0)) (2, (0,1,-1)) (3, (0,0,1)) (21, (-1,1,0)) (10, (1,0,0)) (1, (0,1,1)) (4, (0,0,-1)) (22, (-1,0,0)) (9, (1,1,0)) (4, (0,0,-1)) (1, (0,1,1)) (10, (1,0,0)) (21, (-1,1,0)) (3, (0,0,1)) (2, (0,1,-1)); (5, (0,-1,0)) (24, (-1,0,0)) (11, (1,0,0)) (6, (0,-1,0)) (7, (0,0,0)) (12, (1,0,0)) (23, (-1,0,0)) (5, (0,-1,0)) (8, (0,0,0)) (23, (-1,0,0)) (12, (1,0,0)) (7, (0,0,0)) (6, (0,-1,0)) (11, (1,0,0)) (24, (-1,0,0)) (18, (0,0,1)) (15, (0,0,-1)) (17, (0,-1,0)) (16, (0,0,0)) (19, (0,0,-1)) (14, (0,0,1)) (20, (0,0,0)) (13, (0,-1,0)) (15, (0,0,-1)) (18, (0,0,1)) (13, (0,-1,0)) (20, (0,0,0)) (14, (0,0,1)) (19, (0,0,-1)) (16, (0,0,0)) (17, (0,-1,0)) (10, (1,1,0)) (21, (-1,0,0)) (4, (0,1,-1)) (1, (0,0,1)) (22, (-1,1,0)) (9, (1,0,0)) (3, (0,1,1)) (2, (0,0,-1)) (21, (-1,0,0)) (10, (1,1,0)) (2, (0,0,-1)) (3, (0,1,1)) (9, (1,0,0)) (22, (-1,1,0)) (1, (0,0,1)) (4, (0,1,-1)); (22, (-1,0,-1)) (20, (0,0,0)) (13, (0,0,-1)) (22, (-1,0,0)) (9, (0,0,-1)) (13, (0,0,0)) (20, (0,0,-1)) (10, (0,0,-1)) (21, (-1,0,0)) (17, (0,0,-1)) (16, (0,0,0)) (21, (-1,0,-1)) (10, (0,0,0)) (16, (0,0,-1)) (17, (0,0,0)) (7, (1,0,0)) (6, (0,0,0)) (3, (1,0,1)) (2, (0,0,0)) (6, (1,0,0)) (7, (0,0,0)) (2, (1,0,0)) (3, (0,0,1)) (8, (0,0,0)) (5, (1,0,0)) (4, (0,0,0)) (1, (1,0,1)) (5, (0,0,0)) (8, (1,0,0)) (1, (0,0,1)) (4, (1,0,0)) (14, (0,1,1)) (19, (0,-1,0)) (12, (0,1,0)) (23, (-1,-1,0)) (19, (0,1,0)) (14, (0,-1,1)) (23, (-1,1,0)) (12, (0,-1,0)) (18, (0,-1,1)) (15, (0,1,0)) (24, (-1,-1,0)) (11, (0,1,0)) (15, (0,-1,0)) (18, (0,1,1)) (11, (0,-1,0)) (24, (-1,1,0)); (21, (-1,0,-1)) (16, (0,0,0)) (17, (0,0,-1)) (21, (-1,0,0)) (10, (0,0,-1)) (17, (0,0,0)) (16, (0,0,-1)) (9, (0,0,-1)) (22, (-1,0,0)) (13, (0,0,-1)) (20, (0,0,0)) (22, (-1,0,-1)) (9, (0,0,0)) (20, (0,0,-1)) (13, (0,0,0)) (8, (1,0,0)) (5, (0,0,0)) (1, (1,0,1)) (4, (0,0,0)) (5, (1,0,0)) (8, (0,0,0)) (4, (1,0,0)) (1, (0,0,1)) (7, (0,0,0)) (6, (1,0,0)) (2, (0,0,0)) (3, (1,0,1)) (6, (0,0,0)) (7, (1,0,0)) (3, (0,0,1)) (2, (1,0,0)) (18, (0,1,1)) (15, (0,-1,0)) (11, (0,1,0)) (24, (-1,-1,0)) (15, (0,1,0)) (18, (0,-1,1)) (24, (-1,1,0)) (11, (0,-1,0)) (14, (0,-1,1)) (19, (0,1,0)) (23, (-1,-1,0)) (12, (0,1,0)) (19, (0,-1,0)) (14, (0,1,1)) (12, (0,-1,0)) (23, (-1,1,0)); (24, (-1,-1,0)) (7, (0,0,0)) (6, (1,0,0)) (23, (-1,-1,0)) (12, (0,0,0)) (5, (1,0,0)) (8, (0,0,0)) (12, (0,-1,0)) (23, (-1,0,0)) (6, (0,0,0)) (7, (1,0,0)) (24, (-1,0,0)) (11, (0,-1,0)) (8, (1,0,0)) (5, (0,0,0)) (16, (0,0,0)) (17, (0,0,-1)) (14, (0,-1,1)) (19, (0,0,0)) (13, (0,0,-1)) (20, (0,0,0)) (15, (0,0,0)) (18, (0,-1,1)) (20, (0,0,-1)) (13, (0,0,0)) (19, (0,-1,0)) (14, (0,0,1)) (17, (0,0,0)) (16, (0,0,-1)) (18, (0,0,1)) (15, (0,-1,0)) (1, (1,1,1)) (4, (0,0,0)) (9, (0,1,-1)) (22, (-1,0,0)) (2, (0,1,0)) (3, (1,0,1)) (21, (-1,1,0)) (10, (0,0,-1)) (3, (0,0,1)) (2, (1,1,0)) (22, (-1,0,-1)) (9, (0,1,0)) (4, (1,0,0)) (1, (0,1,1)) (10, (0,0,0)) (21, (-1,1,-1)); (23, (-1,-1,0)) (8, (0,0,0)) (5, (1,0,0)) (24, (-1,-1,0)) (11, (0,0,0)) (6, (1,0,0)) (7, (0,0,0)) (11, (0,-1,0)) (24, (-1,0,0)) (5, (0,0,0)) (8, (1,0,0)) (23, (-1,0,0)) (12, (0,-1,0)) (7, (1,0,0)) (6, (0,0,0)) (20, (0,0,0)) (13, (0,0,-1)) (18, (0,-1,1)) (15, (0,0,0)) (17, (0,0,-1)) (16, (0,0,0)) (19, (0,0,0)) (14, (0,-1,1)) (16, (0,0,-1)) (17, (0,0,0)) (15, (0,-1,0)) (18, (0,0,1)) (13, (0,0,0)) (20, (0,0,-1)) (14, (0,0,1)) (19, (0,-1,0)) (3, (1,1,1)) (2, (0,0,0)) (10, (0,1,-1)) (21, (-1,0,0)) (4, (0,1,0)) (1, (1,0,1)) (22, (-1,1,0)) (9, (0,0,-1)) (1, (0,0,1)) (4, (1,1,0)) (21, (-1,0,-1)) (10, (0,1,0)) (2, (1,0,0)) (3, (0,1,1)) (9, (0,0,0)) (22, (-1,1,-1)); (20, (-1,-1,-1)) (9, (0,1,0)) (22, (0,0,-1)) (20, (-1,-1,0)) (13, (0,0,-1)) (22, (0,0,0)) (9, (0,1,-1)) (16, (0,-1,-1)) (17, (-1,0,0)) (10, (0,0,-1)) (21, (0,1,0)) (17, (-1,0,-1)) (16, (0,-1,0)) (21, (0,1,-1)) (10, (0,0,0)) (2, (1,1,0)) (3, (0,0,0)) (7, (1,-1,1)) (6, (0,0,0)) (3, (1,0,0)) (2, (0,1,0)) (6, (1,0,0)) (7, (0,-1,1)) (1, (0,1,0)) (4, (1,0,0)) (8, (0,-1,0)) (5, (1,0,1)) (4, (0,0,0)) (1, (1,1,0)) (5, (0,0,1)) (8, (1,-1,0)) (23, (0,1,1)) (12, (0,-1,0)) (14, (0,1,0)) (19, (-1,-1,0)) (12, (0,1,0)) (23, (0,-1,1)) (19, (-1,1,0)) (14, (0,-1,0)) (11, (0,-1,1)) (24, (0,1,0)) (18, (-1,-1,0)) (15, (0,1,0)) (24, (0,-1,0)) (11, (0,1,1)) (15, (0,-1,0)) (18, (-1,1,0)); (19, (-1,-1,0)) (1, (0,1,0)) (4, (1,0,0)) (18, (-1,-1,0)) (15, (0,0,0)) (3, (1,0,0)) (2, (0,1,0)) (15, (0,-1,0)) (18, (-1,0,0)) (4, (0,0,0)) (1, (1,1,0)) (19, (-1,0,0)) (14, (0,-1,0)) (2, (1,1,0)) (3, (0,0,0)) (9, (0,1,0)) (22, (0,0,-1)) (11, (0,-1,1)) (24, (0,0,0)) (10, (0,0,-1)) (21, (0,1,0)) (12, (0,0,0)) (23, (0,-1,1)) (21, (0,1,-1)) (10, (0,0,0)) (24, (0,-1,0)) (11, (0,0,1)) (22, (0,0,0)) (9, (0,1,-1)) (23, (0,0,1)) (12, (0,-1,0)) (7, (1,0,1)) (6, (0,0,0)) (16, (0,0,-1)) (17, (-1,0,0)) (8, (0,0,0)) (5, (1,0,1)) (20, (-1,0,0)) (13, (0,0,-1)) (5, (0,0,1)) (8, (1,0,0)) (17, (-1,0,-1)) (16, (0,0,0)) (6, (1,0,0)) (7, (0,0,1)) (13, (0,0,0)) (20, (-1,0,-1)); (18, (-1,-1,0)) (2, (0,1,0)) (3, (1,0,0)) (19, (-1,-1,0)) (14, (0,0,0)) (4, (1,0,0)) (1, (0,1,0)) (14, (0,-1,0)) (19, (-1,0,0)) (3, (0,0,0)) (2, (1,1,0)) (18, (-1,0,0)) (15, (0,-1,0)) (1, (1,1,0)) (4, (0,0,0)) (21, (0,1,0)) (10, (0,0,-1)) (23, (0,-1,1)) (12, (0,0,0)) (22, (0,0,-1)) (9, (0,1,0)) (24, (0,0,0)) (11, (0,-1,1)) (9, (0,1,-1)) (22, (0,0,0)) (12, (0,-1,0)) (23, (0,0,1)) (10, (0,0,0)) (21, (0,1,-1)) (11, (0,0,1)) (24, (0,-1,0)) (5, (1,1,1)) (8, (0,-1,0)) (13, (0,1,-1)) (20, (-1,-1,0)) (6, (0,1,0)) (7, (1,-1,1)) (17, (-1,1,0)) (16, (0,-1,-1)) (7, (0,-1,1)) (6, (1,1,0)) (20, (-1,-1,-1)) (13, (0,1,0)) (8, (1,-1,0)) (5, (0,1,1)) (16, (0,-1,0)) (17, (-1,1,-1)); (17, (-1,-1,-1)) (21, (-1,1,0)) (10, (1,0,-1)) (17, (-1,-1,0)) (16, (0,0,-1)) (10, (1,0,0)) (21, (-1,1,-1)) (13, (0,-1,-1)) (20, (-1,0,0)) (22, (-1,0,-1)) (9, (1,1,0)) (20, (-1,0,-1)) (13, (0,-1,0)) (9, (1,1,-1)) (22, (-1,0,0)) (1, (1,1,1)) (4, (0,0,-1)) (5, (1,-1,1)) (8, (0,0,0)) (4, (1,0,-1)) (1, (0,1,1)) (8, (1,0,0)) (5, (0,-1,1)) (2, (0,1,-1)) (3, (1,0,1)) (6, (0,-1,0)) (7, (1,0,1)) (3, (0,0,1)) (2, (1,1,-1)) (7, (0,0,1)) (6, (1,-1,0)) (11, (1,1,1)) (24, (-1,-1,0)) (15, (0,1,-1)) (18, (-1,-1,1)) (24, (-1,1,0)) (11, (1,-1,1)) (18, (-1,1,1)) (15, (0,-1,-1)) (23, (-1,-1,1)) (12, (1,1,0)) (19, (-1,-1,-1)) (14, (0,1,1)) (12, (1,-1,0)) (23, (-1,1,1)) (14, (0,-1,1)) (19, (-1,1,-1)); (16, (-1,-1,-1)) (10, (0,1,0)) (21, (0,0,-1)) (16, (-1,-1,0)) (17, (0,0,-1)) (21, (0,0,0)) (10, (0,1,-1)) (20, (0,-1,-1)) (13, (-1,0,0)) (9, (0,0,-1)) (22, (0,1,0)) (13, (-1,0,-1)) (20, (0,-1,0)) (22, (0,1,-1)) (9, (0,0,0)) (4, (1,1,0)) (1, (0,0,0)) (8, (1,-1,1)) (5, (0,0,0)) (1, (1,0,0)) (4, (0,1,0)) (5, (1,0,0)) (8, (0,-1,1)) (3, (0,1,0)) (2, (1,0,0)) (7, (0,-1,0)) (6, (1,0,1)) (2, (0,0,0)) (3, (1,1,0)) (6, (0,0,1)) (7, (1,-1,0)) (24, (0,1,1)) (11, (0,-1,0)) (18, (0,1,0)) (15, (-1,-1,0)) (11, (0,1,0)) (24, (0,-1,1)) (15, (-1,1,0)) (18, (0,-1,0)) (12, (0,-1,1)) (23, (0,1,0)) (14, (-1,-1,0)) (19, (0,1,0)) (23, (0,-1,0)) (12, (0,1,1)) (19, (0,-1,0)) (14, (-1,1,0)); (15, (-1,-1,0)) (3, (0,1,0)) (2, (1,0,0)) (14, (-1,-1,0)) (19, (0,0,0)) (1, (1,0,0)) (4, (0,1,0)) (19, (0,-1,0)) (14, (-1,0,0)) (2, (0,0,0)) (3, (1,1,0)) (15, (-1,0,0)) (18, (0,-1,0)) (4, (1,1,0)) (1, (0,0,0)) (10, (0,1,0)) (21, (0,0,-1)) (12, (0,-1,1)) (23, (0,0,0)) (9, (0,0,-1)) (22, (0,1,0)) (11, (0,0,0)) (24, (0,-1,1)) (22, (0,1,-1)) (9, (0,0,0)) (23, (0,-1,0)) (12, (0,0,1)) (21, (0,0,0)) (10, (0,1,-1)) (24, (0,0,1)) (11, (0,-1,0)) (8, (1,0,1)) (5, (0,0,0)) (20, (0,0,-1)) (13, (-1,0,0)) (7, (0,0,0)) (6, (1,0,1)) (16, (-1,0,0)) (17, (0,0,-1)) (6, (0,0,1)) (7, (1,0,0)) (13, (-1,0,-1)) (20, (0,0,0)) (5, (1,0,0)) (8, (0,0,1)) (17, (0,0,0)) (16, (-1,0,-1)); (14, (-1,-1,0)) (4, (0,1,0)) (1, (1,0,0)) (15, (-1,-1,0)) (18, (0,0,0)) (2, (1,0,0)) (3, (0,1,0)) (18, (0,-1,0)) (15, (-1,0,0)) (1, (0,0,0)) (4, (1,1,0)) (14, (-1,0,0)) (19, (0,-1,0)) (3, (1,1,0)) (2, (0,0,0)) (22, (0,1,0)) (9, (0,0,-1)) (24, (0,-1,1)) (11, (0,0,0)) (21, (0,0,-1)) (10, (0,1,0)) (23, (0,0,0)) (12, (0,-1,1)) (10, (0,1,-1)) (21, (0,0,0)) (11, (0,-1,0)) (24, (0,0,1)) (9, (0,0,0)) (22, (0,1,-1)) (12, (0,0,1)) (23, (0,-1,0)) (6, (1,1,1)) (7, (0,-1,0)) (17, (0,1,-1)) (16, (-1,-1,0)) (5, (0,1,0)) (8, (1,-1,1)) (13, (-1,1,0)) (20, (0,-1,-1)) (8, (0,-1,1)) (5, (1,1,0)) (16, (-1,-1,-1)) (17, (0,1,0)) (7, (1,-1,0)) (6, (0,1,1)) (20, (0,-1,0)) (13, (-1,1,-1)); (13, (-1,-1,-1)) (22, (-1,1,0)) (9, (1,0,-1)) (13, (-1,-1,0)) (20, (0,0,-1)) (9, (1,0,0)) (22, (-1,1,-1)) (17, (0,-1,-1)) (16, (-1,0,0)) (21, (-1,0,-1)) (10, (1,1,0)) (16, (-1,0,-1)) (17, (0,-1,0)) (10, (1,1,-1)) (21, (-1,0,0)) (3, (1,1,1)) (2, (0,0,-1)) (6, (1,-1,1)) (7, (0,0,0)) (2, (1,0,-1)) (3, (0,1,1)) (7, (1,0,0)) (6, (0,-1,1)) (4, (0,1,-1)) (1, (1,0,1)) (5, (0,-1,0)) (8, (1,0,1)) (1, (0,0,1)) (4, (1,1,-1)) (8, (0,0,1)) (5, (1,-1,0)) (12, (1,1,1)) (23, (-1,-1,0)) (19, (0,1,-1)) (14, (-1,-1,1)) (23, (-1,1,0)) (12, (1,-1,1)) (14, (-1,1,1)) (19, (0,-1,-1)) (24, (-1,-1,1)) (11, (1,1,0)) (15, (-1,-1,-1)) (18, (0,1,1)) (11, (1,-1,0)) (24, (-1,1,1)) (18, (0,-1,1)) (15, (-1,1,-1)); (10, (-1,0,-1)) (17, (0,1,0)) (16, (0,-1,-1)) (10, (-1,0,0)) (21, (0,0,-1)) (16, (0,-1,0)) (17, (0,1,-1)) (22, (0,0,-1)) (9, (-1,0,0)) (20, (0,-1,-1)) (13, (0,1,0)) (9, (-1,0,-1)) (22, (0,0,0)) (13, (0,1,-1)) (20, (0,-1,0)) (5, (1,1,0)) (8, (0,-1,0)) (4, (1,0,1)) (1, (0,0,0)) (8, (1,-1,0)) (5, (0,1,0)) (1, (1,0,0)) (4, (0,0,1)) (6, (0,1,0)) (7, (1,-1,0)) (3, (0,0,0)) (2, (1,0,1)) (7, (0,-1,0)) (6, (1,1,0)) (2, (0,0,1)) (3, (1,0,0)) (15, (0,1,1)) (18, (0,-1,0)) (24, (0,1,0)) (11, (-1,-1,0)) (18, (0,1,0)) (15, (0,-1,1)) (11, (-1,1,0)) (24, (0,-1,0)) (19, (0,-1,1)) (14, (0,1,0)) (12, (-1,-1,0)) (23, (0,1,0)) (14, (0,-1,0)) (19, (0,1,1)) (23, (0,-1,0)) (12, (-1,1,0)); (9, (-1,0,-1)) (13, (0,1,0)) (20, (0,-1,-1)) (9, (-1,0,0)) (22, (0,0,-1)) (20, (0,-1,0)) (13, (0,1,-1)) (21, (0,0,-1)) (10, (-1,0,0)) (16, (0,-1,-1)) (17, (0,1,0)) (10, (-1,0,-1)) (21, (0,0,0)) (17, (0,1,-1)) (16, (0,-1,0)) (6, (1,1,0)) (7, (0,-1,0)) (2, (1,0,1)) (3, (0,0,0)) (7, (1,-1,0)) (6, (0,1,0)) (3, (1,0,0)) (2, (0,0,1)) (5, (0,1,0)) (8, (1,-1,0)) (1, (0,0,0)) (4, (1,0,1)) (8, (0,-1,0)) (5, (1,1,0)) (4, (0,0,1)) (1, (1,0,0)) (19, (0,1,1)) (14, (0,-1,0)) (23, (0,1,0)) (12, (-1,-1,0)) (14, (0,1,0)) (19, (0,-1,1)) (12, (-1,1,0)) (23, (0,-1,0)) (15, (0,-1,1)) (18, (0,1,0)) (11, (-1,-1,0)) (24, (0,1,0)) (18, (0,-1,0)) (15, (0,1,1)) (24, (0,-1,0)) (11, (-1,1,0)); (12, (-1,-1,0)) (5, (0,1,0)) (8, (1,-1,0)) (11, (-1,-1,0)) (24, (0,0,0)) (7, (1,-1,0)) (6, (0,1,0)) (24, (0,-1,0)) (11, (-1,0,0)) (8, (0,-1,0)) (5, (1,1,0)) (12, (-1,0,0)) (23, (0,-1,0)) (6, (1,1,0)) (7, (0,-1,0)) (13, (0,1,0)) (20, (0,-1,-1)) (15, (0,-1,1)) (18, (0,0,0)) (16, (0,-1,-1)) (17, (0,1,0)) (14, (0,0,0)) (19, (0,-1,1)) (17, (0,1,-1)) (16, (0,-1,0)) (18, (0,-1,0)) (15, (0,0,1)) (20, (0,-1,0)) (13, (0,1,-1)) (19, (0,0,1)) (14, (0,-1,0)) (2, (1,1,1)) (3, (0,0,0)) (21, (0,1,-1)) (10, (-1,0,0)) (1, (0,1,0)) (4, (1,0,1)) (9, (-1,1,0)) (22, (0,0,-1)) (4, (0,0,1)) (1, (1,1,0)) (10, (-1,0,-1)) (21, (0,1,0)) (3, (1,0,0)) (2, (0,1,1)) (22, (0,0,0)) (9, (-1,1,-1)); (11, (-1,-1,0)) (6, (0,1,0)) (7, (1,-1,0)) (12, (-1,-1,0)) (23, (0,0,0)) (8, (1,-1,0)) (5, (0,1,0)) (23, (0,-1,0)) (12, (-1,0,0)) (7, (0,-1,0)) (6, (1,1,0)) (11, (-1,0,0)) (24, (0,-1,0)) (5, (1,1,0)) (8, (0,-1,0)) (17, (0,1,0)) (16, (0,-1,-1)) (19, (0,-1,1)) (14, (0,0,0)) (20, (0,-1,-1)) (13, (0,1,0)) (18, (0,0,0)) (15, (0,-1,1)) (13, (0,1,-1)) (20, (0,-1,0)) (14, (0,-1,0)) (19, (0,0,1)) (16, (0,-1,0)) (17, (0,1,-1)) (15, (0,0,1)) (18, (0,-1,0)) (4, (1,1,1)) (1, (0,0,0)) (22, (0,1,-1)) (9, (-1,0,0)) (3, (0,1,0)) (2, (1,0,1)) (10, (-1,1,0)) (21, (0,0,-1)) (2, (0,0,1)) (3, (1,1,0)) (9, (-1,0,-1)) (22, (0,1,0)) (1, (1,0,0)) (4, (0,1,1)) (21, (0,0,0)) (10, (-1,1,-1))], SMatrix{3, 3, Int64, 9}[[-1 0 0; 0 -1 0; 0 0 -1], [0 -1 0; 1 0 0; 0 0 1], [0 1 0; -1 0 0; 0 0 -1], [-1 0 0; 0 -1 0; 0 0 1], [1 0 0; 0 1 0; 0 0 -1], [0 1 0; -1 0 0; 0 0 1], [0 -1 0; 1 0 0; 0 0 -1], [1 0 0; 0 -1 0; 0 0 -1], [-1 0 0; 0 1 0; 0 0 1], [0 -1 0; -1 0 0; 0 0 -1], [0 1 0; 1 0 0; 0 0 1], [-1 0 0; 0 1 0; 0 0 -1], [1 0 0; 0 -1 0; 0 0 1], [0 1 0; 1 0 0; 0 0 -1], [0 -1 0; -1 0 0; 0 0 1], [0 0 1; 1 0 0; 0 1 0], [0 0 -1; -1 0 0; 0 -1 0], [0 0 1; 0 -1 0; 1 0 0], [0 0 -1; 0 1 0; -1 0 0], [0 0 1; -1 0 0; 0 -1 0], [0 0 -1; 1 0 0; 0 1 0], [0 0 1; 0 1 0; -1 0 0], [0 0 -1; 0 -1 0; 1 0 0], [0 0 -1; 1 0 0; 0 -1 0], [0 0 1; -1 0 0; 0 1 0], [0 0 -1; 0 -1 0; -1 0 0], [0 0 1; 0 1 0; 1 0 0], [0 0 -1; -1 0 0; 0 1 0], [0 0 1; 1 0 0; 0 -1 0], [0 0 -1; 0 1 0; 1 0 0], [0 0 1; 0 -1 0; -1 0 0], [0 1 0; 0 0 1; 1 0 0], [0 -1 0; 0 0 -1; -1 0 0], [1 0 0; 0 0 1; 0 -1 0], [-1 0 0; 0 0 -1; 0 1 0], [0 -1 0; 0 0 1; -1 0 0], [0 1 0; 0 0 -1; 1 0 0], [-1 0 0; 0 0 1; 0 1 0], [1 0 0; 0 0 -1; 0 -1 0], [0 -1 0; 0 0 -1; 1 0 0], [0 1 0; 0 0 1; -1 0 0], [-1 0 0; 0 0 -1; 0 -1 0], [1 0 0; 0 0 1; 0 1 0], [0 1 0; 0 0 -1; -1 0 0], [0 -1 0; 0 0 1; 1 0 0], [1 0 0; 0 0 -1; 0 1 0], [-1 0 0; 0 0 1; 0 -1 0]], SVector{3, Rational{Int32}}[[0//1, 1//4, 3//4], [5//8, 5//8, 0//1], [3//8, 5//8, 3//4], [0//1, 1//4, 0//1], [0//1, 0//1, 3//4], [3//8, 5//8, 0//1], [5//8, 5//8, 3//4], [0//1, 1//4, 3//4], [0//1, 0//1, 0//1], [5//8, 5//8, 3//4], [3//8, 5//8, 0//1], [0//1, 0//1, 3//4], [0//1, 1//4, 0//1], [3//8, 5//8, 3//4], [5//8, 5//8, 0//1], [1//8, 5//8, 1//4], [7//8, 5//8, 1//2], [1//8, 1//4, 7//8], [7//8, 0//1, 7//8], [1//8, 5//8, 1//2], [7//8, 5//8, 1//4], [1//8, 0//1, 7//8], [7//8, 1//4, 7//8], [7//8, 5//8, 1//2], [1//8, 5//8, 1//4], [7//8, 1//4, 7//8], [1//8, 0//1, 7//8], [7//8, 5//8, 1//4], [1//8, 5//8, 1//2], [7//8, 0//1, 7//8], [1//8, 1//4, 7//8], [3//8, 3//4, 7//8], [5//8, 1//2, 7//8], [0//1, 3//4, 1//2], [0//1, 1//2, 1//4], [5//8, 3//4, 7//8], [3//8, 1//2, 7//8], [0//1, 3//4, 1//4], [0//1, 1//2, 1//2], [5//8, 1//2, 7//8], [3//8, 3//4, 7//8], [0//1, 1//2, 1//2], [0//1, 3//4, 1//4], [3//8, 1//2, 7//8], [5//8, 3//4, 7//8], [0//1, 1//2, 1//4], [0//1, 3//4, 1//2]], @@ -812,13 +839,17 @@ end @test canonicalize_ri(r1) == canonicalize_ri(r2) end withid = PeriodicGraphs.IncludingIdentity(symmetries_lta) - @test eltype(withid) == PeriodicSymmetry3D{Rational{Int32}} + @test eltype(withid) == PeriodicSymmetries.PeriodicSymmetry3D{Rational{Int32}} @test length(withid) == 48 - id = first(withid) - @test isequal(id, one(symmetries_lta)) + id, id2 = withid + @test isequal(id, withid[1]) && isequal(id, one(symmetries_lta)) + @test isequal(id2, withid[2]) && isequal(id2, first(symmetries_lta)) trivsymmgroup = PeriodicGraphs.IncludingIdentity(NoSymmetryGroup(lta)) @test unique(trivsymmgroup) == 1:nv(lta) + @test trivsymmgroup(13) == 13 @test length(trivsymmgroup) == 1 + @test PeriodicGraphs.IncludingIdentity(trivsymmgroup) === trivsymmgroup + @test_throws ErrorException one(trivsymmgroup) triv = only(trivsymmgroup) @test triv[5] == 5 @test triv[PeriodicVertex3D(14)] == PeriodicVertex3D(14)