Skip to content

Split adhoc arithmetic operations for MatrixElem#2419

Open
lgoettgens wants to merge 1 commit into
Nemocas:masterfrom
lgoettgens:lg/MatrixElem-adhoc
Open

Split adhoc arithmetic operations for MatrixElem#2419
lgoettgens wants to merge 1 commit into
Nemocas:masterfrom
lgoettgens:lg/MatrixElem-adhoc

Conversation

@lgoettgens

Copy link
Copy Markdown
Member

This does not change any functionality, but fixed some ambiguity issues that popped up when I played around with #2280. As this is eventually needed anyway, and does not do any breaking or conflicting changes, I just opened it as a PR right away.

@lgoettgens lgoettgens added the release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes label Jun 8, 2026
@codecov

codecov Bot commented Jun 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.13%. Comparing base (c982ae7) to head (f9ebe65).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2419   +/-   ##
=======================================
  Coverage   88.12%   88.13%           
=======================================
  Files         130      130           
  Lines       32955    32983   +28     
=======================================
+ Hits        29043    29069   +26     
- Misses       3912     3914    +2     

☔ View full report in Codecov by Harness.
📢 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.

@lgoettgens

Copy link
Copy Markdown
Member Author

I am a bit confused by the failures. Will investigate tomorrow

@lgoettgens

Copy link
Copy Markdown
Member Author

This uncovered a genuine bug in Nemo: Nemocas/Nemo.jl#2309
I still don't understand why we didn't run into this previously, but I won't look deeper into that.

Comment thread src/MatRing.jl

==(x::MatRingElem{T}, y::MatRingElem{T}) where {T <: NCRingElement} = matrix(x) == matrix(y)

###############################################################################

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd like to see a coherent order in the groupings of 4 functions (as though you had simply written once the block of 4 and then used cut-and-paste).
I presume the choice between NCRingElem and NCRingElement is correct.

Comment thread src/Matrix.jl
end

+(x::MatrixElem{T}, y::JuliaRingElement) where T <: NCRingElement = y + x
+(x::MatElem{T}, y::JuliaRingElement) where T <: NCRingElement = y + x

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'd like to see curly brackets around the where clause, as for example in line 1037 below. Personally, I believe that this improves readability...

@JohnAAbbott JohnAAbbott left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

OK. I have made two comments about style.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants