[ library(tentative) | Reference Manual | Alphabetic Index ]
vs_all_violated_index(+VS, -Is)
Retrieve all violated variable indices from a varset
- VS
- A varset
- Is
- A list of integers (output)
Description
Retrieve all variable indices from a varset which have nonzero
violation counts.
Modes and Determinism
- vs_all_violated_index(+, -) is det
Examples
?- Vars=[A,B,C], tent_set(Vars, [1,2,3]), vs_create(Vars, VS),
var_inc_violations(B, 1), vs_all_violated_index(VS, VSIs).
Vars = [A{1 -> 0}, B{2 -> 1}, C{3 -> 0}]
VS = ...
VSIs = [2]
Yes (0.00s cpu)
See Also
vs_random_violated_index / 2, vs_violated_index / 2, vs_all_violated / 2