mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-12-27 10:50:29 +01:00
make orbit_constraint use new constraints indexing
This commit is contained in:
parent
45923d9597
commit
ed181d14f8
@ -41,12 +41,10 @@ function orbit_spvector(vect::AbstractVector, orbits)
|
||||
return orb_vector
|
||||
end
|
||||
|
||||
function orbit_constraint(constraints::Vector{Vector{Tuple{Int,Int}}}, n)
|
||||
function orbit_constraint(constraints::Vector{Vector{Int}}, n)
|
||||
result = spzeros(n,n)
|
||||
for cnstr in constraints
|
||||
for p in cnstr
|
||||
result[p[2], p[1]] += 1.0/length(constraints)
|
||||
end
|
||||
result[cnstr] += 1.0/length(constraints)
|
||||
end
|
||||
return result
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user