New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for vectorization of mapping functions in Octave #8

Closed
oheim opened this Issue Jun 22, 2017 · 1 comment

Comments

Projects
None yet
1 participant
@oheim
Owner

oheim commented Jun 22, 2017

Reference from mailing list: https://lists.gnu.org/archive/html/octave-maintainers/2017-06/msg00101.html

Currently, all generated tests check functions on scalar inputs, e. g. assert f (x1) = y1, assert f (x2) = y2 and so on. When the function is a mapping function, it would be possible to additionally check a vectorized function evaluation like assert f ([x1, x2]) = [y1, y2] and similarly for higher dimensions (matrices, 3-D arrays and so on).

To achieve this, the test data could be stored in a data container (mat files in Octave), which could then be loaded and used for different purposes like testing scalar function evaluation

for i = 1 : numel (data)
  assert (f (data.input(i)), data.output(i));
endfor

and vectorized function evaluation

assert (f (data.input), data.output);

and higher dimension evaluations

assert (f (reshape (...)), reshape (...));

and maybe also broadcasting.

The main part would be to generate a test data dictionary with ITF1788 in native Octave data format, which could then be loaded and used as described above by the built-in self tests (BISTs) of respective functions.

@oheim oheim self-assigned this Jun 22, 2017

@oheim

This comment has been minimized.

Show comment
Hide comment
@oheim

oheim Aug 27, 2017

Owner

This has largely been done by the interval-dictionary plugin and is used by the 3.0.0 release of the interval package for GNU Octave.

To also test broadcasting with that is still an open issue, but I close this issue for now.

Owner

oheim commented Aug 27, 2017

This has largely been done by the interval-dictionary plugin and is used by the 3.0.0 release of the interval package for GNU Octave.

To also test broadcasting with that is still an open issue, but I close this issue for now.

@oheim oheim closed this Aug 27, 2017

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