Skip to content
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

Docs and Tests for Converter #98

Merged
merged 13 commits into from
May 19, 2022
Merged

Conversation

ardasener
Copy link
Contributor

This pr will add a test suite and documentation comments for the members of sparsebase::utils::converter namespace. It also includes a fix concerning conversion of certain types of matrices.

The test suite uses a non-symmetric and weighted matrix for testing. The matrix was originally constructed as a COO, and a known good CSR conversion is obtained using the Scipy Python library. Using this matrix CSR->COO and COO->CSR conversions are tested. These tests simply convert the matrix using our ConverterOrderTwo class and compare the results to the Scipy conversion. They also check that the data is actually deep copied and not just moved. Additionally, the move converters are also checked where certain arrays should be shallow copied.

The test matrix is hard coded into the test file. This is to avoid using the I/O system which will be tested separately.

@ardasener ardasener added type: docs Related to documentation and information state: review needed type: testing Related to testing labels May 18, 2022
Copy link
Contributor

@AmroAlJundi AmroAlJundi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I left a few comments.

AmroAlJundi
AmroAlJundi previously approved these changes May 19, 2022
Copy link
Contributor

@AmroAlJundi AmroAlJundi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great.

@ardasener ardasener merged commit a5729ab into develop May 19, 2022
@ardasener ardasener deleted the feature/converter_docs_tests branch May 19, 2022 09:15
SinanEkm pushed a commit that referenced this pull request Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: review needed type: docs Related to documentation and information type: testing Related to testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants