From 7a8b21db3c581e2531128211218e0c837c519446 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Tue, 25 Jun 2019 17:35:46 +0200 Subject: [PATCH 01/10] relax type assumptions in compute_SOS and else --- src/checksolution.jl | 8 ++++---- src/orbitdata.jl | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/checksolution.jl b/src/checksolution.jl index c102191..8a4a166 100644 --- a/src/checksolution.jl +++ b/src/checksolution.jl @@ -37,7 +37,7 @@ function compute_SOS(RG::GroupRing, Q::AbstractMatrix{<:Real}) return GroupRingElem(result, RG) end -function compute_SOS_square(pm::AbstractMatrix{<:Integer}, Q::AbstractMatrix{<:Real}) +function compute_SOS_square(pm::AbstractMatrix{<:Integer}, Q::AbstractMatrix) result = zeros(eltype(Q), maximum(pm)); for i in 1:size(Q,2) @@ -47,12 +47,12 @@ function compute_SOS_square(pm::AbstractMatrix{<:Integer}, Q::AbstractMatrix{<:R return result end -function compute_SOS_square(RG::GroupRing, Q::AbstractMatrix{<:Real}) +function compute_SOS_square(RG::GroupRing, Q::AbstractMatrix) return GroupRingElem(compute_SOS_square(RG.pm, Q), RG) end -function augIdproj(Q::AbstractMatrix{T}) where {T<:Real} - result = zeros(size(Q)) +function augIdproj(Q::AbstractMatrix{T}) where T + result = zeros(T, size(Q)) l = size(Q, 2) Threads.@threads for j in 1:l col = sum(view(Q, :,j))/l diff --git a/src/orbitdata.jl b/src/orbitdata.jl index 4a8b61f..8542ca7 100644 --- a/src/orbitdata.jl +++ b/src/orbitdata.jl @@ -58,9 +58,9 @@ function orthSVD(M::AbstractMatrix{T}) where {T<:AbstractFloat} return fact.U[:,1:M_rank] end -function orbit_decomposition(G::Group, E::Vector, rdict=GroupRings.reverse_dict(E)) +orbit_decomposition(G::Group, E::AbstractVector, rdict=GroupRings.reverse_dict(E)) = orbit_decomposition(collect(G), E, rdict) - elts = collect(G) +function orbit_decomposition(elts::AbstractVector{<:GroupElem}, E::AbstractVector, rdict=GroupRings.reverse_dict(E)) tovisit = trues(size(E)); orbits = Vector{Vector{Int}}() From 4cef591dfa292ff9b410cd5140b54228cbdd0ecc Mon Sep 17 00:00:00 2001 From: kalmarek Date: Tue, 25 Jun 2019 17:36:37 +0200 Subject: [PATCH 02/10] faster permutation actions on GroupElements --- src/orbitdata.jl | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-) diff --git a/src/orbitdata.jl b/src/orbitdata.jl index 8542ca7..6a85340 100644 --- a/src/orbitdata.jl +++ b/src/orbitdata.jl @@ -178,18 +178,45 @@ end # ############################################################################### -function (p::perm)(A::GroupRingElem) - RG = parent(A) - result = zero(RG, eltype(A.coeffs)) +function (g::perm)(y::GroupRingElem) + RG = parent(y) + result = zero(RG, eltype(y.coeffs)) - for (idx, c) in enumerate(A.coeffs) - if c!= zero(eltype(A.coeffs)) - result[p(RG.basis[idx])] = c + for (idx, c) in enumerate(y.coeffs) + if c!= zero(eltype(y.coeffs)) + result[g(RG.basis[idx])] = c end end return result end +function (g::perm)(y::GroupRingElem{T, <:SparseVector}) where T + RG = parent(y) + index = [RG.basis_dict[g(RG.basis[idx])] for idx in y.coeffs.nzind] + + result = GroupRingElem(sparsevec(index, y.coeffs.nzval, y.coeffs.n), RG) + + return result +end + +function (g::GroupRingElem)(y::GroupRingElem) + res = parent(y)() + for elt in GroupRings.supp(g) + res += g[elt]*elt(y) + end + return res +end + +function (p::perm)(A::MatElem) + length(p.d) == size(A, 1) == size(A,2) || throw("Can't act via $p on matrix of size $(size(A))") + result = similar(A) + @inbounds for i in 1:size(A, 1) + for j in 1:size(A, 2) + result[i, j] = A[p[i], p[j]] # action by permuting rows and colums/conjugation + end + return result +end + ############################################################################### # # Action of WreathProductElems on Nemo.MatElem From f4f9dfe21d2fe50b16bb4e376a1dc109ec7f74cf Mon Sep 17 00:00:00 2001 From: kalmarek Date: Tue, 25 Jun 2019 17:37:08 +0200 Subject: [PATCH 03/10] much faster WreathProductElem actions --- src/orbitdata.jl | 46 +++++++++++++++++++--------------------------- 1 file changed, 19 insertions(+), 27 deletions(-) diff --git a/src/orbitdata.jl b/src/orbitdata.jl index 6a85340..93d375a 100644 --- a/src/orbitdata.jl +++ b/src/orbitdata.jl @@ -225,39 +225,31 @@ end function matrix_emb(n::DirectPowerGroupElem, p::perm) Id = parent(n.elts[1])() - elt = Diagonal([(-1)^(el == Id ? 0 : 1) for el in n.elts]) + elt = Diagonal([(el == Id ? 1 : -1) for el in n.elts]) return elt[:, p.d] end -function (g::WreathProductElem)(A::MatElem) - g_inv = inv(g) - G = matrix_emb(g.n, g_inv.p) - G_inv = matrix_emb(g_inv.n, g.p) - M = parent(A) - return M(G)*A*M(G_inv) -end - -import Base.* - -@doc doc""" - *(x::AbstractAlgebra.MatElem, P::Generic.perm) -> Apply the pemutation $P$ to the rows of the matrix $x$ and return the result. -""" -function *(x::AbstractAlgebra.MatElem, P::Generic.perm) - z = similar(x) - m = nrows(x) - n = ncols(x) - for i = 1:m - for j = 1:n - z[i, j] = x[i,P[j]] - end - end - return z +function (g::WreathProductElem{N})(A::MatElem) where N + # @assert N == size(A,1) == size(A,2) + flips = ntuple(i->(g.n[i].d[1]==1 && g.n[i].d[2]==2 ? 1 : -1), N) + result = similar(A) + @inbounds for i = 1:size(A,1) + for j = 1:size(A,2) + result[i, j] = A[g.p[i], g.p[j]]*(flips[i]*flips[j]) + end + end + return result end function (p::perm)(A::MatElem) - length(p.d) == A.r == A.c || throw("Can't act via $p on matrix of size ($(A.r), $(A.c))") - return p*A*inv(p) + length(p.d) == size(A, 1) == size(A,2) || throw("Can't act via $p on matrix of size $(size(A))") + result = similar(A) + @inbounds for i in 1:size(A, 1) + for j in 1:size(A, 2) + result[p[i],p[j]] = A[i,j] # action by permuting rows and colums/conjugation + end + end + return result end ############################################################################### From 55b7ed09bc8a45d9fc3a059b234b7cd417c02297 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Fri, 28 Jun 2019 00:20:30 +0200 Subject: [PATCH 04/10] reorganize actions --- src/orbitdata.jl | 54 +++++++++++++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 21 deletions(-) diff --git a/src/orbitdata.jl b/src/orbitdata.jl index 93d375a..815986d 100644 --- a/src/orbitdata.jl +++ b/src/orbitdata.jl @@ -178,6 +178,20 @@ end # ############################################################################### +function (g::GroupRingElem)(y::GroupRingElem) + res = parent(y)() + for elt in GroupRings.supp(g) + res += g[elt]*elt(y) + end + return res +end + +############################################################################### +# +# perm actions +# +############################################################################### + function (g::perm)(y::GroupRingElem) RG = parent(y) result = zero(RG, eltype(y.coeffs)) @@ -199,12 +213,15 @@ function (g::perm)(y::GroupRingElem{T, <:SparseVector}) where T return result end -function (g::GroupRingElem)(y::GroupRingElem) - res = parent(y)() - for elt in GroupRings.supp(g) - res += g[elt]*elt(y) +function (p::perm)(A::MatElem) + length(p.d) == size(A, 1) == size(A,2) || throw("Can't act via $p on matrix of size $(size(A))") + result = similar(A) + @inbounds for i in 1:size(A, 1) + for j in 1:size(A, 2) + result[p[i],p[j]] = A[i,j] # action by permuting rows and colums/conjugation + end end - return res + return result end function (p::perm)(A::MatElem) @@ -219,14 +236,20 @@ end ############################################################################### # -# Action of WreathProductElems on Nemo.MatElem +# WreathProductElems action on Nemo.MatElem # ############################################################################### -function matrix_emb(n::DirectPowerGroupElem, p::perm) - Id = parent(n.elts[1])() - elt = Diagonal([(el == Id ? 1 : -1) for el in n.elts]) - return elt[:, p.d] +function (g::WreathProductElem)(y::GroupRingElem) + RG = parent(y) + result = zero(RG, eltype(y.coeffs)) + + for (idx, c) in enumerate(y.coeffs) + if c!= zero(eltype(y.coeffs)) + result[g(RG.basis[idx])] = c + end + end + return result end function (g::WreathProductElem{N})(A::MatElem) where N @@ -241,17 +264,6 @@ function (g::WreathProductElem{N})(A::MatElem) where N return result end -function (p::perm)(A::MatElem) - length(p.d) == size(A, 1) == size(A,2) || throw("Can't act via $p on matrix of size $(size(A))") - result = similar(A) - @inbounds for i in 1:size(A, 1) - for j in 1:size(A, 2) - result[p[i],p[j]] = A[i,j] # action by permuting rows and colums/conjugation - end - end - return result -end - ############################################################################### # # Action of WreathProductElems on AutGroupElem From 7e854f902ac59be33d97ba1b0e8be7de06e219d4 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Fri, 28 Jun 2019 01:11:27 +0200 Subject: [PATCH 05/10] simplify WreathProductElem action on Automorphisms --- src/orbitdata.jl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/orbitdata.jl b/src/orbitdata.jl index 815986d..a49d1d9 100644 --- a/src/orbitdata.jl +++ b/src/orbitdata.jl @@ -289,11 +289,10 @@ end function (g::WreathProductElem)(a::Groups.Automorphism) A = parent(a) - g = AutFG_emb(A,g) - res = A() - Groups.r_multiply!(res, g.symbols, reduced=false) - Groups.r_multiply!(res, a.symbols, reduced=false) - Groups.r_multiply!(res, [inv(s) for s in reverse!(g.symbols)]) + g_emb = AutFG_emb(A,g) + res = deepcopy(g_emb) + res = Groups.r_multiply!(res, a.symbols, reduced=false) + res = Groups.r_multiply!(res, [inv(s) for s in reverse!(g_emb.symbols)]) return res end From 70c72d28d967867ef494f3ee64556b5af36c8db3 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Fri, 28 Jun 2019 01:12:02 +0200 Subject: [PATCH 06/10] further speedups for perm action on Automorphisms --- src/orbitdata.jl | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/orbitdata.jl b/src/orbitdata.jl index a49d1d9..41e08dd 100644 --- a/src/orbitdata.jl +++ b/src/orbitdata.jl @@ -281,12 +281,6 @@ function AutFG_emb(A::AutGroup, g::WreathProductElem) return elt end -function AutFG_emb(A::AutGroup, p::perm) - isa(A.objectGroup, FreeGroup) || throw("Not an Aut(Fₙ)") - parent(p).n == length(A.objectGroup.gens) || throw("No natural embedding of $(parent(p)) into $A") - return A(Groups.perm_autsymbol(p)) -end - function (g::WreathProductElem)(a::Groups.Automorphism) A = parent(a) g_emb = AutFG_emb(A,g) @@ -297,6 +291,8 @@ function (g::WreathProductElem)(a::Groups.Automorphism) end function (p::perm)(a::Groups.Automorphism) - g = AutFG_emb(parent(a),p) - return g*a*inv(g) + res = parent(a)(Groups.perm_autsymbol(p)) + res = Groups.r_multiply!(res, a.symbols, reduced=false) + res = Groups.r_multiply!(res, [Groups.perm_autsymbol(inv(p))]) + return res end From 13452577323fa30b7f4468de9e1f6e9c98731ad5 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Fri, 28 Jun 2019 01:12:32 +0200 Subject: [PATCH 07/10] further speedups for WreathProduct on Mats --- src/orbitdata.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/orbitdata.jl b/src/orbitdata.jl index 41e08dd..c133a74 100644 --- a/src/orbitdata.jl +++ b/src/orbitdata.jl @@ -258,7 +258,10 @@ function (g::WreathProductElem{N})(A::MatElem) where N result = similar(A) @inbounds for i = 1:size(A,1) for j = 1:size(A,2) - result[i, j] = A[g.p[i], g.p[j]]*(flips[i]*flips[j]) + x = A[g.p[i], g.p[j]] + result[i, j] = x*(flips[i]*flips[j]) + # result[i, j] = AbstractAlgebra.mul!(x, x, flips[i]*flips[j]) + # this mul! needs to be separately defined, but is 2x faster end end return result From a9d72d1a87861916c800591814819d68218d60e8 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Thu, 27 Jun 2019 16:51:32 +0200 Subject: [PATCH 08/10] add hdf5-tools to travis --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index edc5a30..4c7dc0b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,6 +14,10 @@ matrix: allow_failures: - julia: nightly - os: osx +addons: + apt: + packages: + - hdf5-tools ## uncomment the following lines to override the default test # script: From a81dccea38926cd1639d3bd1bac02a42ecaa5892 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Thu, 27 Jun 2019 18:39:21 +0200 Subject: [PATCH 09/10] update Project/Manifest --- Manifest.toml | 81 ++++++++++++++++++++++++--------------------------- Project.toml | 4 +-- 2 files changed, 40 insertions(+), 45 deletions(-) diff --git a/Manifest.toml b/Manifest.toml index caf452f..0f5e58b 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -2,9 +2,9 @@ [[AbstractAlgebra]] deps = ["InteractiveUtils", "LinearAlgebra", "Markdown", "Random", "SparseArrays", "Test"] -git-tree-sha1 = "56bdd9e9bb2cfdf0876d0846b337c8f395d9a4b7" +git-tree-sha1 = "c0d57a3f0618bfbb214005860b9b5e5bceafa61c" uuid = "c3fe647b-3220-5bb0-a1ea-a7954cac585d" -version = "0.4.6" +version = "0.5.0" [[Base64]] uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" @@ -16,10 +16,10 @@ uuid = "9e28174c-4ba2-5203-b857-d8d62c4213ee" version = "0.8.10" [[BinaryProvider]] -deps = ["Libdl", "Pkg", "SHA", "Test"] -git-tree-sha1 = "055eb2690182ebc31087859c3dd8598371d3ef9e" +deps = ["Libdl", "SHA"] +git-tree-sha1 = "c7361ce8a2129f20b0e05a89f7070820cfed6648" uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232" -version = "0.5.3" +version = "0.5.4" [[Blosc]] deps = ["BinaryProvider", "CMakeWrapper", "Compat", "Libdl"] @@ -34,19 +34,16 @@ uuid = "e1450e63-4bb3-523b-b2a4-4ffa8c0fd77d" version = "1.0.0" [[CMake]] -deps = ["BinDeps", "Libdl", "Test"] -git-tree-sha1 = "6e39bef3cbb8321e8a464b18a5c20d7cef813938" +deps = ["BinDeps"] +git-tree-sha1 = "c67a8689dc5444adc5eb2be7d837100340ecba11" uuid = "631607c0-34d2-5d66-819e-eb0f9aa2061a" -version = "1.1.1" +version = "1.1.2" [[CMakeWrapper]] deps = ["BinDeps", "CMake", "Libdl", "Parameters", "Test"] -git-tree-sha1 = "2b43d451639984e3571951cc687b8509b0a86c6d" +git-tree-sha1 = "16d4acb3d37dc05b714977ffefa8890843dc8985" uuid = "d5fb7624-851a-54ee-a528-d3f3bac0b4a0" -version = "0.2.2" - -[[CRC32c]] -uuid = "8bf52ea8-c179-5cab-976a-9e18b702a9bc" +version = "0.2.3" [[CRlibm]] deps = ["Libdl", "Test"] @@ -103,10 +100,9 @@ deps = ["Random", "Serialization", "Sockets"] uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" [[ErrorfreeArithmetic]] -deps = ["Test"] -git-tree-sha1 = "e38834f24946eb8c7dcf2bb00580e087faa60c44" +git-tree-sha1 = "a2b7d5a7962e5bfaab0e2e87c9cde7d3087f4e2c" uuid = "90fa49ef-747e-5e6f-a989-263ba693cf1a" -version = "0.3.2" +version = "0.4.0" [[FastRounding]] deps = ["ErrorfreeArithmetic", "Test"] @@ -115,10 +111,10 @@ uuid = "fa42c844-2597-5d31-933b-ebd51ab2693f" version = "0.2.0" [[FileIO]] -deps = ["Pkg", "Random", "Test"] -git-tree-sha1 = "da32159d4a2e526338506685e280e39ed2f18961" +deps = ["Pkg"] +git-tree-sha1 = "351f001a78aa1b7ad2696e386e110b5abd071c71" uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" -version = "1.0.6" +version = "1.0.7" [[ForwardDiff]] deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "InteractiveUtils", "LinearAlgebra", "NaNMath", "Random", "SparseArrays", "SpecialFunctions", "StaticArrays", "Test"] @@ -128,25 +124,25 @@ version = "0.10.3" [[GroupRings]] deps = ["AbstractAlgebra", "LinearAlgebra", "Markdown", "SparseArrays"] -git-tree-sha1 = "0d259b2e2254cc22c526938f37936618784fd03d" -repo-rev = "enh/julia-v0.7" +git-tree-sha1 = "30ed912be2eb74523699bfdaaefd5d5426c43afa" +repo-rev = "master" repo-url = "https://github.com/kalmarek/GroupRings.jl" uuid = "0befed6a-bd73-11e8-1e41-a1190947c2f5" version = "0.2.0" [[Groups]] deps = ["AbstractAlgebra", "LinearAlgebra", "Markdown"] -git-tree-sha1 = "35b712a91e9910bbf150ef1d20d78393e244deaf" -repo-rev = "enh/julia-v0.7" +git-tree-sha1 = "64dcaa46affb4568501d35e6fae36a71a7ae5cbb" +repo-rev = "master" repo-url = "https://github.com/kalmarek/Groups.jl" uuid = "5d8bd718-bd84-11e8-3b40-ad14f4a32557" -version = "0.2.0" +version = "0.2.1" [[HDF5]] -deps = ["BinDeps", "Blosc", "CRC32c", "Distributed", "Homebrew", "Libdl", "LinearAlgebra", "Mmap", "Pkg", "Test", "WinRPM"] -git-tree-sha1 = "dd83e1e9c72e44e3a156438b552cf75dbdda722f" +deps = ["BinDeps", "Blosc", "Homebrew", "Libdl", "Mmap", "WinRPM"] +git-tree-sha1 = "e6f0c154d01faef0d0831d075aa8f279f95946da" uuid = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" -version = "0.11.0" +version = "0.11.1" [[HTTPClient]] deps = ["Compat", "LibCURL"] @@ -183,10 +179,10 @@ uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" version = "0.20.0" [[JuMP]] -deps = ["Calculus", "DataStructures", "ForwardDiff", "LinearAlgebra", "MathOptInterface", "NaNMath", "Random", "SparseArrays", "Statistics", "Test"] -git-tree-sha1 = "db9f08540c1a23269acbae5d520c79f4722899f4" +deps = ["Calculus", "DataStructures", "ForwardDiff", "LinearAlgebra", "MathOptInterface", "NaNMath", "Random", "SparseArrays", "Statistics"] +git-tree-sha1 = "a37fdb14ee3a04b4df44c20a73da89c57035bdf2" uuid = "4076af6c-e467-56ae-b986-b466b2749572" -version = "0.19.0" +version = "0.19.2" [[LegacyStrings]] deps = ["Compat"] @@ -195,10 +191,10 @@ uuid = "1b4a561d-cfcb-5daf-8433-43fcf8b4bea3" version = "0.4.1" [[LibCURL]] -deps = ["BinaryProvider", "Libdl", "Printf", "Test"] -git-tree-sha1 = "d051c8057512ca38a273aaa514145a0b25f24d46" +deps = ["BinaryProvider", "Libdl"] +git-tree-sha1 = "5ee138c679fa202ebe211b2683d1eee2a87b3dbe" uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" -version = "0.5.0" +version = "0.5.1" [[LibExpat]] deps = ["Compat"] @@ -252,15 +248,15 @@ version = "0.3.2" [[Nemo]] deps = ["AbstractAlgebra", "BinaryProvider", "InteractiveUtils", "Libdl", "LinearAlgebra", "Markdown", "Test"] -git-tree-sha1 = "a152b26c888fbe3c191424938243552935ca2f51" +git-tree-sha1 = "b359c25b708c3edcc2f17345d59da7169c207385" uuid = "2edaba10-b0f1-5616-af89-8c11ac63239a" -version = "0.13.1" +version = "0.14.0" [[OrderedCollections]] deps = ["Random", "Serialization", "Test"] -git-tree-sha1 = "85619a3f3e17bb4761fe1b1fd47f0e979f964d5b" +git-tree-sha1 = "c4c13474d23c60d20a67b217f1d7f22a40edf8f1" uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" -version = "1.0.2" +version = "1.1.0" [[Parameters]] deps = ["Markdown", "OrderedCollections", "REPL", "Test"] @@ -289,10 +285,9 @@ deps = ["Serialization"] uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" [[RecipesBase]] -deps = ["Random", "Test"] -git-tree-sha1 = "0b3cb370ee4dc00f47f1193101600949f3dcf884" +git-tree-sha1 = "7bdce29bc9b2f5660a6e5e64d64d91ec941f6aa2" uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" -version = "0.6.0" +version = "0.7.0" [[SHA]] uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" @@ -324,10 +319,10 @@ uuid = "276daf66-3868-5448-9aa4-cd146d93841b" version = "0.7.2" [[StaticArrays]] -deps = ["InteractiveUtils", "LinearAlgebra", "Random", "Statistics", "Test"] -git-tree-sha1 = "3841b39ed5f047db1162627bf5f80a9cd3e39ae2" +deps = ["LinearAlgebra", "Random", "Statistics"] +git-tree-sha1 = "db23bbf50064c582b6f2b9b043c8e7e98ea8c0c6" uuid = "90137ffa-7385-5640-81b9-e52037218182" -version = "0.10.3" +version = "0.11.0" [[Statistics]] deps = ["LinearAlgebra", "SparseArrays"] diff --git a/Project.toml b/Project.toml index 55b843e..21135bd 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "PropertyT" uuid = "03b72c93-0167-51e2-8a1e-eb4ff1fb940d" authors = ["Marek Kaluba "] -version = "0.2.0" +version = "0.2.1" [deps] AbstractAlgebra = "c3fe647b-3220-5bb0-a1ea-a7954cac585d" @@ -20,7 +20,7 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" [compat] GroupRings = "^0.2.0" -Groups = "^0.2.0" +Groups = "^0.2.1" JuMP = "^0.19.0" [extras] From 761879f5fd65b01c7b498ec7c517b4d8929e20d7 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Fri, 28 Jun 2019 01:34:37 +0200 Subject: [PATCH 10/10] fix rebase --- src/orbitdata.jl | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/orbitdata.jl b/src/orbitdata.jl index c133a74..13fe2da 100644 --- a/src/orbitdata.jl +++ b/src/orbitdata.jl @@ -213,17 +213,6 @@ function (g::perm)(y::GroupRingElem{T, <:SparseVector}) where T return result end -function (p::perm)(A::MatElem) - length(p.d) == size(A, 1) == size(A,2) || throw("Can't act via $p on matrix of size $(size(A))") - result = similar(A) - @inbounds for i in 1:size(A, 1) - for j in 1:size(A, 2) - result[p[i],p[j]] = A[i,j] # action by permuting rows and colums/conjugation - end - end - return result -end - function (p::perm)(A::MatElem) length(p.d) == size(A, 1) == size(A,2) || throw("Can't act via $p on matrix of size $(size(A))") result = similar(A) @@ -231,6 +220,7 @@ function (p::perm)(A::MatElem) for j in 1:size(A, 2) result[i, j] = A[p[i], p[j]] # action by permuting rows and colums/conjugation end + end return result end