Just a though but building a matrix from another matrix plus a line of ones or just getting a vector that sums all the rows of a matrix should be intuitive with any algebra crate.

#rust #algebra #WhyIsThisShitSoHard

I'm sticking with nalgebra for now because it turns out I also need QR decomposition and I haven't found it in the other crates proposed. I figured out a few things that makes it work...

Well, I'm sure there is a better and more optimized way to write it, but I got it working.

Still it was interesting to try to do the same (supposedly) basic stuff with several crates.

Spoiler, it still a pain, no matter the crate.

I don't think I can post my code since I'm basically trying to port *bad* C++/Eigen/assimp code from work. Maybe a very small part, so someone can tell me how bad my code is and offer a correction.

#rust #algebra #ISwearMathematicianWriteTheUgliestCode

@Ambraven It can be done in gwrizienn without overhead, but it's not very ergonomic. example for building a matrix https://git.zoai.re/tuxmain/gwrizienn/src/branch/main/examples/ntwe.rs#L77-L83

I wanted to make nice functions for matrix concatenation, but const expressions were not powerful enough to check that the sizes sum up correctly.

Matrices are stored row-wise so row sum should be trivial. (create a vector then iterate on the rows)

gwrizienn/examples/ntwe.rs at main

gwrizienn - (WiP) Fast and easy polynomial quotient ring arithmetic for lattice crypto in Rust

Gitzoa