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

feat: adjust for upcoming indexing changes #3276

Merged
merged 2 commits into from
Jan 31, 2024
Merged

feat: adjust for upcoming indexing changes #3276

merged 2 commits into from
Jan 31, 2024

Conversation

thofma
Copy link
Collaborator

@thofma thofma commented Jan 30, 2024

No functional changes here, but it will allow us to eventually clean up some of the indexing for matrices.

Copy link

codecov bot commented Jan 30, 2024

Codecov Report

Merging #3276 (8d932ef) into master (03bb047) will increase coverage by 0.00%.
Report is 1 commits behind head on master.
The diff coverage is 92.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3276   +/-   ##
=======================================
  Coverage   81.62%   81.63%           
=======================================
  Files         546      546           
  Lines       73282    73296   +14     
=======================================
+ Hits        59820    59833   +13     
- Misses      13462    13463    +1     
Files Coverage Δ
.../FTheoryTools/src/LiteratureModels/constructors.jl 92.67% <100.00%> (ø)
experimental/FTheoryTools/src/auxiliary.jl 94.87% <100.00%> (ø)
experimental/GITFans/src/GITFans.jl 94.22% <100.00%> (ø)
experimental/GaloisGrp/src/Solve.jl 74.20% <100.00%> (ø)
experimental/LieAlgebras/src/CartanMatrix.jl 98.19% <100.00%> (ø)
experimental/LieAlgebras/src/RootSystem.jl 61.30% <100.00%> (ø)
experimental/QuadFormAndIsom/test/runtests.jl 100.00% <ø> (ø)
...rimental/Schemes/ToricIdealSheaves/constructors.jl 44.94% <100.00%> (ø)
...ntersections/src/homogeneous_polynomial_actions.jl 92.85% <100.00%> (ø)
...ntal/SymmetricIntersections/src/representations.jl 96.66% <100.00%> (ø)
... and 15 more

... and 3 files with indirect coverage changes

@@ -259,7 +259,7 @@ function _construct_literature_model_over_concrete_base(model_dict::Dict{String,

# Find divisor classes of the internal model sections
auxiliary_base_grading = matrix(ZZ, transpose(hcat([[eval_poly(weight, ZZ) for weight in vec] for vec in model_dict["model_data"]["auxiliary_base_grading"]]...)))
auxiliary_base_grading = vcat([[Int(k) for k in auxiliary_base_grading[i,:]] for i in 1:nrows(auxiliary_base_grading)]...)
auxiliary_base_grading = vcat([[Int(k) for k in auxiliary_base_grading[i:i,:]] for i in 1:nrows(auxiliary_base_grading)]...)
Copy link
Member

Choose a reason for hiding this comment

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

Not an objection, just trying to understand: presumably the old and new code will behave differently in the future? What will the difference be?

For Julia matrices, the difference is whether a vector or a matrix is returned. But we don't have dedicated vector objects, have we? Or is the plan to add them? (Ah, perhaps for a sparse matrix we'd be returning SRow versus SMat ?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. It will just be a Vector (see the Linear algebra roadmap), so that the dimension of the indices now correspond to the dimension to the output (as for julia arrays).

  1. Nowadays we have more support for Matrix * Vector and solve(::Matrix, ::Vector) and things like that, which we did not have 5 years ago. So back then we avoided Vector at all costs.
  2. At the moment, it is cumbersome to get rows/columns as Vector. With the "new" indexing, it is easy: Just do [i, :]. To get it as a matrix, just do [[i], :] or [i:i, :].

Copy link
Member

@lgoettgens lgoettgens left a comment

Choose a reason for hiding this comment

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

I noticed one place that probably needs to get adjusted as well. Apart from that, fine with me

…dard_constructions.jl

Co-authored-by: Lars Göttgens <lars.goettgens@rwth-aachen.de>
@fingolfin fingolfin enabled auto-merge (squash) January 31, 2024 11:31
@fingolfin fingolfin merged commit e7599c8 into master Jan 31, 2024
21 checks passed
@fingolfin fingolfin deleted the th/indexing branch January 31, 2024 12:02
ooinaruhugh pushed a commit to ooinaruhugh/Oscar.jl that referenced this pull request Feb 15, 2024
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.

4 participants