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

Issue:Creating band matrices #1160, implemented initial version #1461

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Matoka26
Copy link

I've tried to implement an initial version for the from_bands method to construct a band matrix from some vectors. I ve tried that in order to learn Rust, I'm open to advices.
I am not sure how to compile the project so i could only test the logic inside a separate project.
Hope it can be helpful.

Approach:

  • I only considered odd number of vectors, the middle one becoming the main diagonal, each from its left become under diagonal bands, each from right become over diagonal bands.
  • The size of the resulting matrix is calculated as such: the length of the longest vector + the offset from the main diagonal
  • Set the elements on the corresponding positions

…on for from_bands method, but couldnt test it
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