Create unit tests for the matrix-vector multiplication method of the ELL matrix class. Unit tests are meant to confirm the correctness of code against data with a known and expected output. The ELL matvec multiplication method should receive an input array that contains the ELL format nonzero values from matrix A and output a solution array b from the multiplication of these values and a multiplication vector x.
Tasks:
Create a test that checks that the inputs are the correct size and contain the correct values.
Create a test that checks that the output vector of the ELL matvec method matches the true solution of the linear system.
Definition of done:
The tests performed ensure that the ELL matvec method either outputs the correct solution vector or provides a false statement from the tests for all inputs.
I'd say include a few simple and edge cases (empty matrix, a matrix of zeros or/ones, etc.) since those are easy to do tests on. Also there should be multiple tests just in case.
Background:
Create unit tests for the matrix-vector multiplication method of the ELL matrix class. Unit tests are meant to confirm the correctness of code against data with a known and expected output. The ELL matvec multiplication method should receive an input array that contains the ELL format nonzero values from matrix A and output a solution array b from the multiplication of these values and a multiplication vector x.
Tasks:
Create a test that checks that the inputs are the correct size and contain the correct values. Create a test that checks that the output vector of the ELL matvec method matches the true solution of the linear system.
Definition of done:
The tests performed ensure that the ELL matvec method either outputs the correct solution vector or provides a false statement from the tests for all inputs.