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

fix(algorithm): updated matAlgo07xSSf algorithm to return sparse matrix #3307

Merged
merged 6 commits into from
Nov 6, 2024

Conversation

Aakash-Rana
Copy link
Contributor

@Aakash-Rana Aakash-Rana commented Nov 1, 2024

Updated matAlgo07xSSf algorithm and fixed #3219

This PR addresses an issue in the matAlgo07xSSf algorithm, where the result of any operation on two sparse matrices returning a dense matrix instead of preserving the sparse matrix format. This function matAlgo07xSSf is utilized by various functions such as dotDivide , dotPow , bitXor , larger , smaller , equal , xor , smallerEq etc - to perform operations on sparse matrices.

The update ensures that the result of any sparse-sparse operation is correctly returned as a sparse matrix, maintaining consistency with the input types.

Changes:

  • Refactored the matAlgo07xSSf algorithm to handle operations of sparse-sparse matrix ensuring only non-zero or true results are stored.
  • Adjusted dependencies to properly handle sparse matrix operations.
  • Updated corresponding test cases to compare result with sparse matrix.

@race-of-sloths Include this PR

@race-of-sloths
Copy link

race-of-sloths commented Nov 1, 2024

@Aakash-Rana Thank you for your contribution! Your pull request is now a part of the Race of Sloths!
Do you want to apply for monthly streak? Get 8+ score for a single PR this month and receive boost for race-of-sloths!

Shows inviting banner with latest news.

Shows profile picture for the author of the PR

Current status: executed
Reviewer Score
@josdejong 13

Your contribution is much appreciated with a final score of 13!
You have received 140 (130 base + 10 monthly bonus) Sloth points for this contribution

@josdejong received 25 Sloth Points for reviewing and scoring this pull request.

Congratulations @Aakash-Rana! Your PR was highly scored and you completed another monthly streak! To keep your monthly streak make another pull request next month and get 8+ score for it

What is the Race of Sloths

Race of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow

For contributors:

  • Tag @race-of-sloths inside your pull requests
  • Wait for the maintainer to review and score your pull request
  • Check out your position in the Leaderboard
  • Keep weekly and monthly streaks to reach higher positions
  • Boast your contributions with a dynamic picture of your Profile

For maintainers:

  • Score pull requests that participate in the Race of Sloths
  • Engage contributors with fair scoring and fast responses so they keep their streaks
  • Promote the Race to the point where the Race starts promoting you
  • Grow the community of your contributors

Feel free to check our website for additional details!

Bot commands
  • For contributors
    • Include a PR: @race-of-sloths include to enter the Race with your PR
  • For maintainers:
    • Invite contributor @race-of-sloths invite to invite the contributor to participate in a race or include it, if it's already a runner.
    • Assign points: @race-of-sloths score [1/2/3/5/8/13] to award points based on your assessment.
    • Reject this PR: @race-of-sloths exclude to send this PR back to the drawing board.
    • Exclude repo: @race-of-sloths pause to stop bot activity in this repo until @race-of-sloths unpause command is called

@rana-aakash rana-aakash mentioned this pull request Nov 1, 2024
@akorchyn
Copy link

akorchyn commented Nov 1, 2024

Hello. First of all, sorry for hopping in the PR.
I just wanted to share that we have added a repo to the supported list. You can keep using it here. Enjoy!

@josdejong josdejong changed the base branch from develop to v14 November 6, 2024 15:53
@josdejong
Copy link
Owner

Thanks @Aakash-Rana, this is a neat fix!

I'll merge this PR into the first next major version v14 since it changes the behavior of the functions like dotDivide and dotPow.

@josdejong josdejong merged commit 66775ee into josdejong:v14 Nov 6, 2024
8 checks passed
@race-of-sloths
Copy link

🥁 Score it!

@josdejong, please score the PR with @race-of-sloths score [1/2/3/5/8/13]. The contributor deserves it.
If no scoring is provided within 24 hours, this PR will be scored as 2 🦥

@josdejong josdejong added this to the v14 milestone Nov 6, 2024
@Aakash-Rana
Copy link
Contributor Author

Hello @josdejong
Thanks for the review. Yes it could be a breaking change and should go in the next major release.

@josdejong
Copy link
Owner

@race-of-sloths score 13

@Aakash-Rana Aakash-Rana deleted the bugfix branch November 15, 2024 07:46
@josdejong josdejong mentioned this pull request Nov 20, 2024
7 tasks
@josdejong
Copy link
Owner

Published now in v14.0.0.

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.

dotDivide changes to denseMatrix when the inputs are sparseMatrix
6 participants