-
Notifications
You must be signed in to change notification settings - Fork 1
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: add ArrowheadMatrix #21
Conversation
Can you recheck the PR? For example, this adds |
@bvdmitri Yeah the structure is implemented but there is a nuance. Performance tests do not pass if you can help me or suggest me smt there it would be nice. |
Right now it passed but I think it's a fluke... The only tests that fails are |
Yes those tests fail because of the |
This PR is not ready for merging. It's many things missed here (docs for example) but I want to solve the main issue first: |
@Nimrais can you double check coverage? I cannot see branch coverage and PR coverage. Maybe this is a problem with the bayesbase repo? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super nice work @Nimrais !!
This PR introduces an efficient implementation of ArrowheadMatrix, a specialized matrix.
ArrowheadMatrix
: Implements a memory-efficient representation of arrowhead matrices https://en.wikipedia.org/wiki/Arrowhead_matrix.Basic Operations: Supports essential matrix operations like size, conversion to dense matrix, and multiplication with vectors.
Linear System Solving: Implements an efficient algorithm for solving linear systems involving arrowhead matrices.
Inverse Representation: Introduces InvArrowheadMatrix for representing the inverse of an ArrowheadMatrix without explicitly computing it.
Performance Optimizations: Utilizes the special structure of arrowhead matrices to achieve better time and space complexity compared to dense matrix operations.
Implementation Details
ArrowheadMatrix
: Stores only the diagonal elements and the "arrow" parts of the matrix.mul!
: Optimized matrix-vector multiplication.linsolve!
: Efficient linear system solver tailored for arrowhead structure.InvArrowheadMatrix
: Lazy representation of the inverse, computing elements only when needed.