mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-30 10:00:28 +01:00
sparsify by default
This commit is contained in:
parent
760270d2e0
commit
c0e2577684
@ -32,7 +32,6 @@ function OrbitData(name::String)
|
|||||||
splap² = GroupRings.mul(splap, splap, pm);
|
splap² = GroupRings.mul(splap, splap, pm);
|
||||||
|
|
||||||
Uπs = load(joinpath(name, "U_pis.jld"), "Uπs");
|
Uπs = load(joinpath(name, "U_pis.jld"), "Uπs");
|
||||||
# Uπs = sparsify.(Uπs);
|
|
||||||
#dimensions of the corresponding πs:
|
#dimensions of the corresponding πs:
|
||||||
dims = load(joinpath(name, "U_pis.jld"), "dims")
|
dims = load(joinpath(name, "U_pis.jld"), "dims")
|
||||||
|
|
||||||
@ -80,11 +79,11 @@ end
|
|||||||
|
|
||||||
function transform(U::AbstractArray, V::AbstractArray; sparse=false)
|
function transform(U::AbstractArray, V::AbstractArray; sparse=false)
|
||||||
w = U'*V*U
|
w = U'*V*U
|
||||||
sparse && sparsify!(w)
|
sparse && w = sparsify(w)
|
||||||
return w
|
return w
|
||||||
end
|
end
|
||||||
|
|
||||||
A(data::OrbitData, π, t) = data.dims[π]*transform(data.Us[π], data.cnstr[t])
|
A(data::OrbitData, π, t) = data.dims[π]*transform(data.Us[π], data.cnstr[t], sparse=true)
|
||||||
|
|
||||||
function constrLHS(m::JuMP.Model, data::OrbitData, t)
|
function constrLHS(m::JuMP.Model, data::OrbitData, t)
|
||||||
l = endof(data.Us)
|
l = endof(data.Us)
|
||||||
|
Loading…
Reference in New Issue
Block a user