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:
parent
33fc456879
commit
668d403171
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user