State of matrix concatenation, and workarounds #1295
johan-overbye
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What is the state of the matrix concatenation discussion/implementation? I've searched the issues and there seem to be multiple approaches in play at the moment.
As a user of nalgebra I'm missing this feature a lot. My best workaround at the moment seems to be:
Matrix
, which fits both of the matrices I want to concatenate, with arbitrary values. (All my matrices are currently fixed-size.)target_matrix.fixed_view_mut::<n, m>(x, y).clone_from(&source_matrix)
for each sourceMatrix
. Note thatn
andm
can't be inferred, which makes it pretty clunky.Any insight into when there might be a feature for this as well as better workarounds is much appreciated! Thanks a lot to the nalgebra contributors for this beautiful crate.
EDIT: My workaround above actually only seems to work if the source matrix has one column. (Haven't tied with one row.) Attempting to
clone_from
a 3x3 matrix into the top of a 4x3 matrix, I get:EDIT 2:
copy_from
works though. (T
isf32
.)Beta Was this translation helpful? Give feedback.
All reactions