[ library(constraint_pools) | Reference Manual | Alphabetic Index ]
set_pool_item(+Pool, +Item)
Associate a term Item with the pool Pool
- Pool
- Atom
- Item
- Arbitrary term
Description
An arbitrary term (for example a solver handle) is associated with the
pool Pool, in order to be retrieved later using get_pool_item/2.
The modification to the pool is backtrackable.
Examples
?- create_constraint_pool(p, 0, []).
Yes (0.08s cpu)
?- set_pool_item(p, sample_item), get_pool_item(p,X).
X = sample_item
Yes (0.00s cpu)
See Also
create_constraint_pool / 3, get_pool_item / 2