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

Abstract type for matrices wrapping a single vector #98

Merged

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented Jun 1, 2023

Defining this abstract type would mean that several functions need to only be extended for the abstract type instead of for every concrete subtype. Also, future types subtyping the abstract type get these methods for free.

@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.26 🎉

Comparison is base (7558d4a) 94.72% compared to head (eb6c504) 94.98%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #98      +/-   ##
==========================================
+ Coverage   94.72%   94.98%   +0.26%     
==========================================
  Files           7        7              
  Lines         796      798       +2     
==========================================
+ Hits          754      758       +4     
+ Misses         42       40       -2     
Impacted Files Coverage Δ
src/ToeplitzMatrices.jl 92.30% <ø> (-7.70%) ⬇️
src/hankel.jl 96.15% <100.00%> (+2.48%) ⬆️
src/special.jl 99.29% <100.00%> (+0.74%) ⬆️
src/toeplitz.jl 97.53% <100.00%> (-0.04%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jishnub jishnub force-pushed the AbstractToeplitzSingleVector branch from e8b8c8d to eb6c504 Compare June 2, 2023 06:37
@putianyi889
Copy link
Contributor

Could this idea be extended to a new package, say LinearStructuredMatrices (or maybe just add to ArrayInterfaces)? They have a parent where they linearly depend on.

@jishnub
Copy link
Member Author

jishnub commented Jun 2, 2023

Does that help in general? In this case, we know the structure of the matrices and can forward various functions to the parent.

@putianyi889
Copy link
Contributor

putianyi889 commented Jun 2, 2023

Does that help in general? In this case, we know the structure of the matrices and can forward various functions to the parent.

for example, Diagonal depending on one vector, Bidiagonal depending on a tuple of vectors, CircularArray depending on a matrix, Adjoint depending on a vector or matrix.

"linear" could be too general for most cases. A subtype would be that the values of parent are exactly projected to different locations.

@jishnub
Copy link
Member Author

jishnub commented Jun 2, 2023

This might be worth discussing in ArrayLayouts, as, IIUC, you're suggesting field traits aside from the existing structure traits. It might be overkill for this package at present, but if such a trait is added elsewhere, we may use it here

@jishnub jishnub merged commit 49bde1d into JuliaLinearAlgebra:master Jun 3, 2023
11 checks passed
@jishnub jishnub deleted the AbstractToeplitzSingleVector branch June 3, 2023 11:34
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.

None yet

2 participants