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

Cleaner matrix arithmetic #11

Open
1 of 2 tasks
jdwhite48 opened this issue Jan 31, 2022 · 1 comment
Open
1 of 2 tasks

Cleaner matrix arithmetic #11

jdwhite48 opened this issue Jan 31, 2022 · 1 comment
Assignees
Labels
restructure The API could be organized better

Comments

@jdwhite48
Copy link
Owner

jdwhite48 commented Jan 31, 2022

Since Matrix<_> (i.e. Vec<Vec<_>>) are variable-length, this leads to a number of issues wherein I must implement my own custom functions for matrix arithmetic, instead of being able to use the syntactic sugar provided by Add, Mul, etc. that would make the matrix representation easier to work with.

  • Figure out how to statically encode Matrix such that one can meaningfully define One (the identity matrix, if it's square; if not, ...?) and Zero (zero matrix).
  • Restructure Matrix trait to use Add<Self>, Neg<Self>, Mul<Other>, etc.
@jdwhite48 jdwhite48 added the restructure The API could be organized better label Jan 31, 2022
@jdwhite48 jdwhite48 assigned jdwhite48 and unassigned jdwhite48 Jan 31, 2022
@jdwhite48 jdwhite48 self-assigned this Nov 8, 2022
@jdwhite48
Copy link
Owner Author

jdwhite48 commented Nov 9, 2022

I gave up on implementing a custom Matrix type myself and will be pulling from the nalgebra library to whatever extent possible. See 12-integrate-matrix-libs/src/data_structures.rs and #12 for more details about how this affects encoded Matrices (TL;DR fields are amenable to nalgebra, but group action / scalar multiplication still requires a custom implementation).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
restructure The API could be organized better
Projects
None yet
Development

No branches or pull requests

1 participant