Skip to content

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

Open
Matoka26 wants to merge 1 commit intodimforge:mainfrom
Matoka26:create_band_matrices
Open

Issue:Creating band matrices #1160, implemented initial version#1461
Matoka26 wants to merge 1 commit intodimforge:mainfrom
Matoka26:create_band_matrices

Conversation

@Matoka26
Copy link
Copy Markdown

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