All
syntax
- all(a)
- all(a, relation)
definition
- all(a) results in a boolean Parameter, with the value True if all values of boolean Data item a are True and the value False in all other cases.
- all(a, relation) results in a boolean Attribute, with the values True if all values of boolean data item a are True and the values False in all other cases, grouped by relation. The Domain unit of the resulting attribute is the Values unit of the relation.
applies to
- attribute a with bool Value type
- relation with value type of the group CanBeDomainUnit
conditions
The domain unit of arguments a and relation must match.
performance
- Without relation: O(n) where n = number of elements in the domain of a. May short-circuit when first False is found.
- With relation: O(n) where n = number of elements in the domain of a. Evaluates all elements to determine result per group.
example
parameter<bool> allA := all(A); result = True
parameter<bool> allB := all(B); result = False
parameter<bool> allC := all(C); result = False
| A | B | C |
|---|---|---|
| True | True | False |
| True | False | False |
| True | True | False |
| True | False | False |
| True | True | False |
ADomain, nr of rows = 5