You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Result value when the argument is an empty section
__sec_reduce_all_zero
One if all argument values are zero; zero otherwise
int
One
__sec_reduce_all_nonzero
One if all argument values are nonzero; zero otherwise
int
One
__sec_reduce_any_zero
One if any argument value is zero; zero otherwise
int
Zero
__sec_reduce_any_nonzero
One if any argument value is nonzero; zero otherwise
int
Zero
Why is it that an empty section is defined to be (1) "all zero", (2) "all nonzero", (3) "not any zero", and (4) "not any nonzero"? The latter two make sense, because any empty set doesn't have anything in it. But why is an empty set both all zero and all nonzero?
Maybe I missed something, either in the CPLEX text or in set theory.
The text was updated successfully, but these errors were encountered:
Because __sec_reduce_all_zero(A[:]) should always be equal to !
__sec_reduce_any_nonzero(A[:]). It would be odd if N == 0 were a
special case.
Put another way, the first two operations are logical AND operations and
the latter two are logical OR operations. The identity value for AND is
one and for OR is zero.
Put a third way, imagine you have an array A of N elements, to compute
__sec_reduce_all_zero(A) as a loop, you would write:
_Bool result = true;
for (size_t i = 0; i < N && result; i++)
result &&= (A[i] == 0);
return result;
What is the result when N == 0 (i.e., an empty array)?
Reduction operation Result value Result type Result value when the
argument is an empty section
|__sec_reduce_all_zero| One if all argument values are zero; zero
otherwise |int| One
|__sec_reduce_all_nonzero| One if all argument values are nonzero;
zero otherwise |int| One
|__sec_reduce_any_zero| One if any argument value is zero; zero
otherwise |int| Zero
|__sec_reduce_any_nonzero| One if any argument value is nonzero; zero
otherwise |int| Zero
Why is it that an empty section is defined to be (1) "all zero", (2)
"all nonzero", (3) "not any zero", and (4) "not any nonzero"? The
latter two make sense, because any empty set doesn't have anything in
it. But why is an empty set both all zero and all nonzero?
Maybe I missed something, either in the CPLEX text or in set theory.
(I'm looking at http://wiki.edg.com/pub/CPLEX/MeetingApr252016/sections.html)
__sec_reduce_all_zero
int
__sec_reduce_all_nonzero
int
__sec_reduce_any_zero
int
__sec_reduce_any_nonzero
int
Why is it that an empty section is defined to be (1) "all zero", (2) "all nonzero", (3) "not any zero", and (4) "not any nonzero"? The latter two make sense, because any empty set doesn't have anything in it. But why is an empty set both all zero and all nonzero?
Maybe I missed something, either in the CPLEX text or in set theory.
The text was updated successfully, but these errors were encountered: