add selective constraint(pm, k)

This commit is contained in:
kalmarek 2018-08-20 03:50:16 +02:00
parent 33fc456879
commit 668d403171
1 changed files with 6 additions and 1 deletions

View File

@ -9,9 +9,14 @@ function constraints(pm::Matrix{I}, total_length=maximum(pm)) where {I<:Integer}
return cnstrs
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
return constraints
return cnstr
end
function spLaplacian(RG::GroupRing, S, T::Type=Float64)