recollect_by_cond

relational-functions recollect_by_cond

description

Recollects attribute values of a selection back to an original set using the condition used for the selection.

Use case: covert a compacted domain back to the uncompacted domain.

syntax

  1. recollect_by_cond(condition: D->Bool, values: S->V, fallbackValues: D->V)
  2. recollect_by_cond(condition: D->Bool, values: S->V, fallbackValue: ->V)
  3. recollect_by_cond(condition: D->Bool, values: S->V)

definition

recollect_by_cond results in an attribute D->V having values taken from the values argument where a condition is true and using fallbackValue or fallbackValues where a condition is false, or undefined when no fallbackValues are provided.

example

attribute<bool> IsDenseEnough (domain) := recollect_by_cond(domain/IsCompactedDomain, IsDenseEnough_CD);