Aether
Aether copied to clipboard
[FEAT] reduce duplicate code
Is your feature request related to a problem? Please describe.
In the src/electrodynamics_unit_tests.cpp program, there is a section of code that is repeated frequently:
//results verification
for (int i = 0; i < vals.n_rows; ++i) {
for (int j = 0; j < vals.n_cols; ++j) {
if (res(i, j) != answer(i, j))
return false;
}
}
Describe the solution you'd like This code snippet should be included as an evaluation routine that is called by the test functions.
Describe alternatives you've considered Leave in duplicate code that makes the routines harder to maintain.
This kind of code can be easily done and should be done with Armadillo.
I think that this is an outlier and this issue can be closed. Aether is pretty good at moving repeated code into functions.