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 scalartype parameter to AbstractTensorMap #106

Closed
wants to merge 23 commits into from
Closed

Conversation

lkdvos
Copy link
Collaborator

@lkdvos lkdvos commented Mar 15, 2024

This PR promotes the scalartype of a tensor to be present in the AbstractTensorMap supertype.
In order to make this work, some minor changes were made in many method signatures. Wherever possible, I chose to remove as many of the type parameters as possible, to write the code as generic as possible.

I chose for AbstractTensorMap{E,S,N1,N2}, having the eltype/scalartype first in mimicking of AbstractArray{T,N}. It has some advantages, but also some disadvantages as opposed to AbstractTensorMap{S,N1,N2,E}. In the end, I don't have a very strong opinion on this, so if you do, I'll just turn it around.

Importantly, this is very much a breaking change, so it might not be a bad idea to start a v1.0 branch somewhere and point this PR to that, and only merging into master when we are ready for that.

Copy link

codecov bot commented Mar 18, 2024

Codecov Report

Attention: Patch coverage is 77.35849% with 36 lines in your changes are missing coverage. Please review.

Project coverage is 81.09%. Comparing base (ce96d55) to head (ebf4ade).

Files Patch % Lines
src/tensors/braidingtensor.jl 55.00% 9 Missing ⚠️
src/tensors/indexmanipulations.jl 59.09% 9 Missing ⚠️
src/tensors/tensor.jl 80.95% 8 Missing ⚠️
src/tensors/adjoint.jl 50.00% 4 Missing ⚠️
src/tensors/linalg.jl 40.00% 3 Missing ⚠️
src/tensors/abstracttensor.jl 88.88% 2 Missing ⚠️
ext/TensorKitChainRulesCoreExt.jl 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #106      +/-   ##
==========================================
- Coverage   81.40%   81.09%   -0.31%     
==========================================
  Files          42       42              
  Lines        5565     5565              
==========================================
- Hits         4530     4513      -17     
- Misses       1035     1052      +17     

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

@lkdvos
Copy link
Collaborator Author

lkdvos commented Mar 20, 2024

Closing this PR to bundle it in a big v1.0 update

@lkdvos lkdvos closed this Mar 20, 2024
@lkdvos lkdvos deleted the ld/scalartype branch September 9, 2024 13:32
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.

1 participant