Skip to content

Unexpected behaviour of eWiseApply([out] Matrix, [in] Matrix, [in] Matrix, ... ) variants #203

Description

@byjtew

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions