Logical composition¶
Predicates can be combined with boolean operators.
Supported forms¶
a & bfor logical ANDa | bfor logical OR~afor logical NOT
Examples¶
pred = (site("i") > 0) & (site("j") < 2)
pred = (site("i") == site("j")) | (site("i") == 0)
pred = ~(site("i") < 0)
For callback-style construction, nkdsl.dsl.context.ExpressionContext
also exposes all_of, any_of, and not_ helpers.