An unexpected behaviour using the two variants of eWiseApply for matrices was noticed.
Documentation of the two variants
eWiseApply([out] Matrix, [in] Matrix, [in] Matrix, [in] Monoid) is supposed to apply the given monoid's operator over all elements of the two matrices, including the {non_zero, zero} couples (UNION), using the provided monoid's identity as a replacement for the zero value.
eWiseApply([out] Matrix, [in] Matrix, [in] Matrix, [in] Operator) is supposed to apply the given monoid's operator over all elements of the two matrices, except for the {non_zero, zero} couples (INTERSECTION).
The observed behaviour showed that only the INTERSECTION behaviour was implemented. A very user-friendly unit-test has been created for the occasion: eWiseApplyMatrix_variants.
Testing quickly:
make test_eWiseApplyMatrix_variants_debug_reference
./tests/unit/eWiseApplyMatrix_variants_debug_reference
Extra note: This unit-test should probably be re-evaluated.
An unexpected behaviour using the two variants of eWiseApply for matrices was noticed.
eWiseApply([out] Matrix, [in] Matrix, [in] Matrix, [in] Monoid)is supposed to apply the given monoid's operator over all elements of the two matrices, including the {non_zero, zero} couples (UNION), using the provided monoid's identity as a replacement for the zero value.eWiseApply([out] Matrix, [in] Matrix, [in] Matrix, [in] Operator)is supposed to apply the given monoid's operator over all elements of the two matrices, except for the {non_zero, zero} couples (INTERSECTION).The observed behaviour showed that only the INTERSECTION behaviour was implemented. A very user-friendly unit-test has been created for the occasion: eWiseApplyMatrix_variants.
Testing quickly:
Extra note: This unit-test should probably be re-evaluated.