[ library(ic_gap_sbdd) | Reference Manual | Alphabetic Index ]

sbdd_try_set(+Var, ++Value, ++Bool)

Try adding/excluding a value to/from an SBDD set search variable
Var
The set variable to use
Value
The value to try
Bool
Whether to add or exclude the value first

Description

Make an SBDD (set) search choice. Specifically, if Bool is 1, try adding the (integer) value Value to the (set) variable Var; on backtracking exclude it. If Bool is 0, try excluding Value first and try adding it on backtracking.

Var should be an element of an array previously initialised using sbdd_initialise_set/5.

Use sbdd_try_set/4 if you wish to know which is the currently successful branch (Value in Var or Value notin Var).

See Also

sbdd_initialise_set / 5, sbdd_try_set / 4, sbdd_try / 2