1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-23 08:15:29 +01:00

migrate to AbstractAlgebra

This commit is contained in:
kalmarek 2018-07-31 10:21:54 +02:00
parent 75c249abb8
commit 81e08eb857
4 changed files with 11 additions and 10 deletions

View File

@ -4,6 +4,7 @@ SCS
IntervalArithmetic IntervalArithmetic
JLD JLD
Memento Memento
Nemo 0.7.9- Nemo
AbstractAlgebra
Groups Groups
GroupRings GroupRings

View File

@ -204,7 +204,7 @@ function λandP(m::JuMP.Model, data::OrbitData, sett::Settings)
return λ, recP return λ, recP
end end
function load_preps(fname::String, G::Nemo.Group) function load_preps(fname::String, G::Group)
lded_preps = load(fname, "perms_d") lded_preps = load(fname, "perms_d")
permG = PermutationGroup(length(first(lded_preps))) permG = PermutationGroup(length(first(lded_preps)))
@assert length(lded_preps) == order(G) @assert length(lded_preps) == order(G)

View File

@ -6,7 +6,7 @@ include("Projections.jl")
# #
############################################################################### ###############################################################################
function orbit_decomposition(G::Nemo.Group, E::Vector, rdict=GroupRings.reverse_dict(E)) function orbit_decomposition(G::Group, E::Vector, rdict=GroupRings.reverse_dict(E))
elts = collect(elements(G)) elts = collect(elements(G))
@ -82,9 +82,9 @@ end
function perm_reps(G::Group, E::Vector, E_rdict=GroupRings.reverse_dict(E)) function perm_reps(G::Group, E::Vector, E_rdict=GroupRings.reverse_dict(E))
elts = collect(elements(G)) elts = collect(elements(G))
l = length(elts) l = length(elts)
preps = Vector{Generic.perm}(l) preps = Vector{perm}(l)
permG = Nemo.PermutationGroup(length(E)) permG = PermutationGroup(length(E))
Threads.@threads for i in 1:l Threads.@threads for i in 1:l
preps[i] = permG(PropertyT.perm_repr(elts[i], E, E_rdict)) preps[i] = permG(PropertyT.perm_repr(elts[i], E, E_rdict))
@ -128,14 +128,14 @@ function orthSVD{T}(M::AbstractMatrix{T})
return fact[:U][:,1:M_rank] return fact[:U][:,1:M_rank]
end end
function compute_orbit_data{T<:GroupElem}(logger, name::String, S::Vector{T}, autS::Nemo.Group; radius=2) function compute_orbit_data{T<:GroupElem}(logger, name::String, S::Vector{T}, autS::Group; radius=2)
isdir(name) || mkdir(name) isdir(name) || mkdir(name)
info(logger, "Generating ball of radius $(2*radius)") info(logger, "Generating ball of radius $(2*radius)")
# TODO: Fix that by multiple dispatch? # TODO: Fix that by multiple dispatch?
G = parent(first(S)) G = parent(first(S))
Id = (isa(G, Nemo.Ring) ? one(G) : G()) Id = (isa(G, Ring) ? one(G) : G())
@logtime logger E_2R, sizes = Groups.generate_balls(S, Id, radius=2*radius); @logtime logger E_2R, sizes = Groups.generate_balls(S, Id, radius=2*radius);
info(logger, "Balls of sizes $sizes.") info(logger, "Balls of sizes $sizes.")

View File

@ -1,10 +1,10 @@
module PropertyT module PropertyT
using Nemo using AbstractAlgebra
using Groups using Groups
using GroupRings using GroupRings
import Nemo: Group, GroupElem, Ring, Generic.perm import AbstractAlgebra: Group, GroupElem, Ring, perm
using JLD using JLD
using JuMP using JuMP