-
Notifications
You must be signed in to change notification settings - Fork 20.1k
Add matrix multiplication with double[][] and unit tests #6417
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
base: master
Are you sure you want to change the base?
Conversation
…g point arithmetic errors
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6417 +/- ##
============================================
+ Coverage 74.86% 74.88% +0.02%
- Complexity 5482 5490 +8
============================================
Files 682 683 +1
Lines 19012 19027 +15
Branches 3670 3675 +5
============================================
+ Hits 14233 14249 +16
+ Misses 4224 4223 -1
Partials 555 555 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -0,0 +1,48 @@ | |||
package com.thealgorithms.matrix; | |||
|
|||
public final class MatrixMultiplication { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add here another detailed explanation above the class. For example by providing a link and most importantly adding the time- and space complexity :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay:)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you please add testcases for 1x1 matrices and not-rectangular matrices?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure:)
Summary
This PR adds an implementation of standard matrix multiplication using
double[][]
arrays in thecom.thealgorithms.matrix
package.MatrixMultiplication
class multiplies two 2D matrices with floating-point support.Tests
Added a comprehensive JUnit 5 test class
MatrixMultiplicationTest
with:Please let me know if any changes are needed!