mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-26 17:05:27 +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
|
return orb_vector
|
||||||
end
|
end
|
||||||
|
|
||||||
function orbit_constraint(constraints::Vector{Vector{Tuple{Int,Int}}}, n)
|
function orbit_constraint(constraints::Vector{Vector{Int}}, n)
|
||||||
result = spzeros(n,n)
|
result = spzeros(n,n)
|
||||||
for cnstr in constraints
|
for cnstr in constraints
|
||||||
for p in cnstr
|
result[cnstr] += 1.0/length(constraints)
|
||||||
result[p[2], p[1]] += 1.0/length(constraints)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user