1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-12-25 10:20:30 +01:00

perm → Generic.Perm

This commit is contained in:
kalmarek 2019-10-30 23:58:10 +01:00
parent dc14b2fd95
commit 70bf9ad74c
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15
7 changed files with 67 additions and 51 deletions

View File

@ -2,13 +2,19 @@
[[AbstractAlgebra]]
deps = ["InteractiveUtils", "LinearAlgebra", "Markdown", "Random", "SparseArrays", "Test"]
git-tree-sha1 = "0d4f7283435bd7e12a703a3fd58aa11224a96019"
git-tree-sha1 = "da0bf98d73f2f34c35d58981fcf139f16749a394"
uuid = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
version = "0.5.2"
version = "0.7.1"
[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
[[BenchmarkTools]]
deps = ["JSON", "Printf", "Statistics"]
git-tree-sha1 = "90b73db83791c5f83155016dd1cc1f684d4e1361"
uuid = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
version = "0.4.3"
[[BinDeps]]
deps = ["Compat", "Libdl", "SHA", "URIParser"]
git-tree-sha1 = "12093ca6cdd0ee547c39b1870e0c9c3f154d9ca9"
@ -16,10 +22,10 @@ uuid = "9e28174c-4ba2-5203-b857-d8d62c4213ee"
version = "0.8.10"
[[BinaryProvider]]
deps = ["Libdl", "Logging", "SHA"]
git-tree-sha1 = "c7361ce8a2129f20b0e05a89f7070820cfed6648"
deps = ["Libdl", "SHA"]
git-tree-sha1 = "29995a7b317bbd06be147e1974a3541ce2502dca"
uuid = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
version = "0.5.6"
version = "0.5.7"
[[Blosc]]
deps = ["BinaryProvider", "CMakeWrapper", "Compat", "Libdl"]
@ -47,9 +53,9 @@ version = "0.7.1"
[[Calculus]]
deps = ["Compat"]
git-tree-sha1 = "f60954495a7afcee4136f78d1d60350abd37a409"
git-tree-sha1 = "bd8bbd105ba583a42385bd6dc4a20dad8ab3dc11"
uuid = "49dc2e85-a5d0-5ad3-a950-438e2897f1b9"
version = "0.4.1"
version = "0.5.0"
[[CommonSubexpressions]]
deps = ["Test"]
@ -59,15 +65,15 @@ version = "0.2.0"
[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "84aa74986c5b9b898b0d1acaf3258741ee64754f"
git-tree-sha1 = "ed2c4abadf84c53d9e58510b5fc48912c2336fbb"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "2.1.0"
version = "2.2.0"
[[DataStructures]]
deps = ["InteractiveUtils", "OrderedCollections"]
git-tree-sha1 = "0809951a1774dc724da22d26e4289bbaab77809a"
git-tree-sha1 = "1fe8fad5fc84686dcbc674aa255bc867a64f8132"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.17.0"
version = "0.17.5"
[[Dates]]
deps = ["Printf"]
@ -111,14 +117,14 @@ uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
version = "1.0.7"
[[ForwardDiff]]
deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "InteractiveUtils", "LinearAlgebra", "NaNMath", "Random", "SparseArrays", "SpecialFunctions", "StaticArrays", "Test"]
git-tree-sha1 = "4c4d727f1b7e0092134fabfab6396b8945c1ea5b"
deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "NaNMath", "Random", "SpecialFunctions", "StaticArrays"]
git-tree-sha1 = "e2c81741a8be50de143ecddee942396894f47750"
uuid = "f6369f11-7733-5829-9624-2563aa707210"
version = "0.10.3"
version = "0.10.4"
[[GroupRings]]
deps = ["AbstractAlgebra", "LinearAlgebra", "Markdown", "SparseArrays"]
git-tree-sha1 = "9f41bad54217ce2605c13f10b79d1221c259ed32"
git-tree-sha1 = "0953bbaa3ccd0b7e12585e705011f01ac8672c7c"
repo-rev = "master"
repo-url = "https://github.com/kalmarek/GroupRings.jl"
uuid = "0befed6a-bd73-11e8-1e41-a1190947c2f5"
@ -126,27 +132,27 @@ version = "0.3.0"
[[Groups]]
deps = ["AbstractAlgebra", "LinearAlgebra", "Markdown"]
git-tree-sha1 = "bf267f82f4c313a6deb3db64efc7893b139d4340"
git-tree-sha1 = "852339602ab880eb0e2a78f072ad386f3266f8a2"
repo-rev = "master"
repo-url = "https://github.com/kalmarek/Groups.jl"
uuid = "5d8bd718-bd84-11e8-3b40-ad14f4a32557"
version = "0.2.2"
version = "0.2.3"
[[HDF5]]
deps = ["BinaryProvider", "Blosc", "Libdl", "Mmap"]
git-tree-sha1 = "635ae44613c8c8dcf5d5b0084bfa00abea498e1f"
deps = ["BinaryProvider", "Blosc", "CMakeWrapper", "Libdl", "Mmap"]
git-tree-sha1 = "c14a84878428b66222fccea6ed89cdafa7c22ae4"
uuid = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f"
version = "0.12.0"
version = "0.12.4"
[[InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
[[IntervalArithmetic]]
deps = ["CRlibm", "FastRounding", "LinearAlgebra", "Markdown", "RecipesBase", "SetRounding", "StaticArrays", "Test"]
git-tree-sha1 = "e2379c6b0b48ce6e414e8eeabec95cd6982aad22"
deps = ["CRlibm", "FastRounding", "LinearAlgebra", "Markdown", "RecipesBase", "SetRounding", "StaticArrays"]
git-tree-sha1 = "f97d8d63c3f849b0f545062de4634bc9f100d8ec"
uuid = "d1acc4aa-44c8-5952-acd4-ba5d80a2a253"
version = "0.15.2"
version = "0.16.1"
[[JLD]]
deps = ["Compat", "FileIO", "HDF5", "LegacyStrings", "Profile", "Random"]
@ -154,11 +160,17 @@ git-tree-sha1 = "95fd5d7f129918a75d0535aaaf5b8e235e6e0b0b"
uuid = "4138dd39-2aa7-5051-a626-17a0bb65d9c8"
version = "0.9.1"
[[JSON]]
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
git-tree-sha1 = "b34d7cef7b337321e97d22242c3c2b91f476748e"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.21.0"
[[JuMP]]
deps = ["Calculus", "DataStructures", "ForwardDiff", "LinearAlgebra", "MathOptInterface", "NaNMath", "Random", "SparseArrays", "Statistics"]
git-tree-sha1 = "a37fdb14ee3a04b4df44c20a73da89c57035bdf2"
git-tree-sha1 = "ba7f96010ed290d77d5c941c32e5df107ca688a4"
uuid = "4076af6c-e467-56ae-b986-b466b2749572"
version = "0.19.2"
version = "0.20.1"
[[LegacyStrings]]
deps = ["Compat"]
@ -184,10 +196,10 @@ deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
[[MathOptInterface]]
deps = ["Compat", "Unicode"]
git-tree-sha1 = "5d3de69c9220610d0336ab45d3eb8b6ac7a7c807"
deps = ["BenchmarkTools", "LinearAlgebra", "OrderedCollections", "SparseArrays", "Test", "Unicode"]
git-tree-sha1 = "0d0e9987440b0b5c03f8df9cd30694f1acec81bb"
uuid = "b8f27783-ece8-5eb3-8dc8-9495eed66fee"
version = "0.8.4"
version = "0.9.6"
[[MathProgBase]]
deps = ["Compat"]
@ -211,10 +223,16 @@ uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
version = "1.1.0"
[[Parameters]]
deps = ["Markdown", "OrderedCollections", "REPL", "Test"]
git-tree-sha1 = "70bdbfb2bceabb15345c0b54be4544813b3444e4"
deps = ["OrderedCollections"]
git-tree-sha1 = "b62b2558efb1eef1fa44e4be5ff58a515c287e38"
uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a"
version = "0.10.3"
version = "0.12.0"
[[Parsers]]
deps = ["Dates", "Test"]
git-tree-sha1 = "ef0af6c8601db18c282d092ccbd2f01f3f0cd70b"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "0.3.7"
[[Pkg]]
deps = ["Dates", "LibGit2", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
@ -265,16 +283,16 @@ deps = ["LinearAlgebra", "Random"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
[[SpecialFunctions]]
deps = ["BinDeps", "BinaryProvider", "Libdl", "Test"]
git-tree-sha1 = "0b45dc2e45ed77f445617b99ff2adf0f5b0f23ea"
deps = ["BinDeps", "BinaryProvider", "Libdl"]
git-tree-sha1 = "3bdd374b6fd78faf0119b8c5d538788dbf910c6e"
uuid = "276daf66-3868-5448-9aa4-cd146d93841b"
version = "0.7.2"
version = "0.8.0"
[[StaticArrays]]
deps = ["LinearAlgebra", "Random", "Statistics"]
git-tree-sha1 = "db23bbf50064c582b6f2b9b043c8e7e98ea8c0c6"
git-tree-sha1 = "1085ffbf5fd48fdba64ef8e902ca429c4e1212d3"
uuid = "90137ffa-7385-5640-81b9-e52037218182"
version = "0.11.0"
version = "0.11.1"
[[Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]

View File

@ -20,8 +20,6 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
[compat]
GroupRings = "^0.3.0"
Groups = "^0.2.1"
IntervalArithmetic = "^0.15.0"
JuMP = "^0.19.0"
[extras]
SCS = "c946c3f1-0d1f-5ce8-9dea-7daa1f7e2d13"

View File

@ -13,7 +13,7 @@ using GroupRings
using JLD
using JuMP
import AbstractAlgebra: Group, NCRing, perm
import AbstractAlgebra: Group, NCRing
import MathProgBase.SolverInterface.AbstractMathProgSolver

View File

@ -31,7 +31,7 @@ function (chi::DirectProdCharacter)(g::DirectPowerGroupElem)
return res
end
function (chi::PermCharacter)(g::Generic.perm)
function (chi::PermCharacter)(g::Generic.Perm)
R = AbstractAlgebra.partitionseq(chi.p)
p = Partition(Generic.permtype(g))
return Int(Generic.MN1inner(R, p, 1, Generic._charvalsTable))
@ -97,7 +97,7 @@ function idempotents(RG::GroupRing{Generic.PermGroup{S}}, T::Type=Rational{Int})
return GroupRingElem{T}[1//2*(Id + transp), 1//2*(Id - transp)]
end
projs = Vector{Vector{Generic.perm{S}}}()
projs = Vector{Vector{Generic.Perm{S}}}()
for l in 2:RG.group.n
u = RG.group([circshift([i for i in 1:l], -1); [i for i in l+1:RG.group.n]])
i = 0

View File

@ -4,7 +4,7 @@
#
###############################################################################
struct OrbitData{T<:AbstractArray{Float64, 2}, GEl<:GroupElem, P<:perm}
struct OrbitData{T<:AbstractArray{Float64, 2}, GEl<:GroupElem, P<:Generic.Perm}
orbits::Vector{Vector{Int}}
preps::Dict{GEl, P}
Uπs::Vector{T}
@ -147,7 +147,7 @@ end
function perm_reps(G::Group, E::Vector, E_rdict=GroupRings.reverse_dict(E))
elts = collect(G)
l = length(elts)
preps = Vector{perm}(undef, l)
preps = Vector{Generic.Perm}(undef, l)
permG = PermutationGroup(length(E))
@ -163,7 +163,7 @@ function matrix_repr(x::GroupRingElem, mreps::Dict)
return sum(x[i].*mreps[parent(x).basis[i]] for i in nzeros)
end
function matrix_reps(preps::Dict{T,perm{I}}) where {T<:GroupElem, I<:Integer}
function matrix_reps(preps::Dict{T,Generic.Perm{I}}) where {T<:GroupElem, I<:Integer}
kk = collect(keys(preps))
mreps = Vector{SparseMatrixCSC{Float64, Int}}(undef, length(kk))
Threads.@threads for i in 1:length(kk)
@ -192,7 +192,7 @@ end
#
###############################################################################
function (g::perm)(y::GroupRingElem)
function (g::Generic.Perm)(y::GroupRingElem)
RG = parent(y)
result = zero(RG, eltype(y.coeffs))
@ -204,7 +204,7 @@ function (g::perm)(y::GroupRingElem)
return result
end
function (g::perm)(y::GroupRingElem{T, <:SparseVector}) where T
function (g::Generic.Perm)(y::GroupRingElem{T, <:SparseVector}) where T
RG = parent(y)
index = [RG.basis_dict[g(RG.basis[idx])] for idx in y.coeffs.nzind]
@ -213,7 +213,7 @@ function (g::perm)(y::GroupRingElem{T, <:SparseVector}) where T
return result
end
function (p::perm)(A::MatAlgElem)
function (p::Generic.Perm)(A::MatAlgElem)
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)
@ -290,7 +290,7 @@ function (g::WreathProductElem)(a::Groups.Automorphism)
return res
end
function (p::perm)(a::Groups.Automorphism)
function (p::Generic.Perm)(a::Groups.Automorphism)
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))])

View File

@ -140,7 +140,7 @@ end
function reconstruct(Ps::Vector{M},
preps::Dict{GEl, P}, Uπs::Vector{U}, dims::Vector{Int}) where
{M<:AbstractMatrix, GEl<:GroupElem, P<:perm, U<:AbstractMatrix}
{M<:AbstractMatrix, GEl<:GroupElem, P<:Generic.Perm, U<:AbstractMatrix}
lU = length(Uπs)
transfP = [dims[π].*Uπs[π]*Ps[π]*Uπs[π]' for π in 1:lU]

View File

@ -1,8 +1,8 @@
isopposite(σ::perm, τ::perm, i=1, j=2) =
isopposite(σ::Generic.Perm, τ::Generic.Perm, i=1, j=2) =
σ[i] τ[i] && σ[i] τ[j] &&
σ[j] τ[i] && σ[j] τ[j]
isadjacent(σ::perm, τ::perm, i=1, j=2) =
isadjacent(σ::Generic.Perm, τ::Generic.Perm, i=1, j=2) =
(σ[i] == τ[i] && σ[j] τ[j]) || # first equal, second differ
(σ[j] == τ[j] && σ[i] τ[i]) || # sedond equal, first differ
(σ[i] == τ[j] && σ[j] τ[i]) || # first σ equal to second τ