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 getDiag(), getTriu(), and getTril() methods for matrices. #48

Open
jacobdwatters opened this issue Apr 23, 2023 · 0 comments
Open
Assignees

Comments

@jacobdwatters
Copy link
Owner

  • getDiag() should return the diagonal entries of a matrix as a vector.

  • getTriu() should return the upper triangular portion of the matrix with the rest of the entries zeros.

  • getTriu(int idx) should return the upper triangular portion on and above the diagonal idx with the rest of the entries set to zero. Where idx=0 indicate the principle diagonal, idx=1 indicates the first super diagonal and idx=-1 indicates the first sub diagonal.

  • getTril() should return the lower triangular portion of the matrix with the rest of the entries zeros.

  • getTril(int idx) should return the lower triangular portion on and below the diagonal idx with the rest of the entries set to zero. Where idx=0 indicate the principle diagonal, idx=1 indicates the first super diagonal and idx=-1 indicates the first sub diagonal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant