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

Add some more MatElem/MatRingElem conversions #1839

Merged
merged 4 commits into from
Oct 8, 2024

Conversation

lgoettgens
Copy link
Collaborator

As discussed on slack.

The added tests demonstrate all of the new conversions that are now possible.

Copy link

codecov bot commented Oct 7, 2024

Codecov Report

Attention: Patch coverage is 90.19608% with 5 lines in your changes missing coverage. Please review.

Project coverage is 88.15%. Comparing base (96c82d5) to head (09933d8).
Report is 9 commits behind head on master.

Files with missing lines Patch % Lines
src/Matrix.jl 81.48% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1839      +/-   ##
==========================================
+ Coverage   88.13%   88.15%   +0.01%     
==========================================
  Files         119      119              
  Lines       29982    30017      +35     
==========================================
+ Hits        26426    26460      +34     
- Misses       3556     3557       +1     

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

src/Matrix.jl Outdated
R = base_ring(s)
for i = 1:nrows(s)
for j = 1:ncols(s)
M[i, j] = R(a[i, j])
Copy link
Member

Choose a reason for hiding this comment

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

This is somewhat inefficient if base_ring(a) == base_ring(s) (as we perform a redundant parent check for every element). But we can always improve that in a future update if we deem it necessary.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, I see the point. I'll do a small improvement tomorrow

Copy link
Member

Choose a reason for hiding this comment

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

From my POV it would be fine to merge this as-is and then tweak it later, whenever you (or someone else) has time resp. need for it. Your choice.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done in 09933d8 (#1839). please merge if you are happy with it

@@ -148,21 +148,7 @@ end
#
###############################################################################

# create a zero matrix
function (a::Generic.MatSpace{T})() where {T <: NCRingElement}
Copy link
Member

Choose a reason for hiding this comment

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

These days Generic.MatSpace is the only subtype of MatSpace so perhaps we should just merge the two

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

See #1840

@fingolfin fingolfin enabled auto-merge (squash) October 8, 2024 10:28
@fingolfin fingolfin merged commit c8aec15 into Nemocas:master Oct 8, 2024
30 checks passed
@lgoettgens lgoettgens deleted the lg/mat-matring branch October 8, 2024 13:56
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