Skip to content

Updated Randomized Matrix Multiplication Verifier #6237

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

Closed
wants to merge 6 commits into from

Conversation

Menil-dev
Copy link

@Menil-dev Menil-dev commented May 11, 2025

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

Menil-dev added 2 commits May 12, 2025 01:34
This commit implements a Monte Carlo method to verify matrix multiplication for both integer and decimal valued matrices. The algorithm generates random binary vectors, multiplies them with the matrices, and compares the results. If any mismatch is found, the multiplication is deemed incorrect. This efficient verification avoids full matrix multiplication by using partial calculations. It also accounts for floating-point precision with a small tolerance and ensures matrix dimensions are consistent before verification.
I had used wrong format in for loop, changed that in my implementation
@codecov-commenter
Copy link

codecov-commenter commented May 11, 2025

Codecov Report

Attention: Patch coverage is 0% with 52 lines in your changes missing coverage. Please review.

Project coverage is 73.71%. Comparing base (b09766e) to head (5d375d7).

Files with missing lines Patch % Lines
...ithms/randomized/MatrixMultiplicationVerifier.java 0.00% 52 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6237      +/-   ##
============================================
- Coverage     73.93%   73.71%   -0.22%     
+ Complexity     5334     5333       -1     
============================================
  Files           676      677       +1     
  Lines         18475    18527      +52     
  Branches       3574     3594      +20     
============================================
- Hits          13659    13658       -1     
- Misses         4267     4319      +52     
- Partials        549      550       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Menil-dev Menil-dev closed this by deleting the head repository May 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants