1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-12-26 10:35:29 +01:00

add selective constraint(pm, k)

This commit is contained in:
kalmarek 2018-08-20 03:50:16 +02:00
parent 33fc456879
commit 668d403171

View File

@ -9,9 +9,14 @@ function constraints(pm::Matrix{I}, total_length=maximum(pm)) where {I<:Integer}
return cnstrs return cnstrs
end end
function constraint(pm::Matrix{I}, k) where {I<:Integer}
cnstr = Vector{I}()
for i in eachindex(pm)
if pm[i] == k
push!(cnstr, i)
end end
end end
return constraints return cnstr
end end
function spLaplacian(RG::GroupRing, S, T::Type=Float64) function spLaplacian(RG::GroupRing, S, T::Type=Float64)