IFELSE#
Conditional “if/else” statement for operators
-
template<typename C1, typename T1, typename T2>
auto matx::IFELSE(C1 cond, T1 t1, T2 t2)# Compares two operators or views and conditionally executes the second statement if the first is true. Values from an operator are executed individually, and the only requirement for the conditional is the comparison operator must be defined for the particular type. For example, operator< on two integers is okay, but the same operator on two complex numbers will give a compiler error.
- Parameters:
cond – Condition to perform the IF/ELSE on
t1 – op1
t2 – op2
Examples#
IFELSE(tiv0 == d, tov0 = z, tov0 = d).run(exec);