We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
My goal is to construct a symmetric matrix M, which is composed of some known submatrices.
For example, the M I'm gonna construct is
$$ M=\begin{bmatrix} M_{11}&M_{12}\\ M_{21}&M_{22}\\ \end{bmatrix} $$
And the submatrix $M_{ij}$ are some known submatrices:
$$ M_{11} = \begin{bmatrix} a&b\\ b&a\\ \end{bmatrix} $$
$$ M_{12} = \begin{bmatrix} c&d\\ e&f\\ \end{bmatrix} $$
$$ M_{21} = \begin{bmatrix} c&e\\ d&f\\ \end{bmatrix} $$
$$ M_{22} = \begin{bmatrix} g&h\\ h&i\\ \end{bmatrix} $$
That is to say, the final M matrix is:
$$ M= \begin{bmatrix} a&b&c&d\\ b&a&e&f\\ c&e&g&h\\ d&f&h&i\\ \end{bmatrix} $$
I want to know if there is a method in nalgebra that can still efficiently construct M when the size of M is large.
In Python, the numpy has hstack or vstack function to implement my desire. Is there a function with the same functionality in nalgebra?
The text was updated successfully, but these errors were encountered:
#1375 is ready to merge, and it'll probably make it to the next release. Hopefully this will be soon. In the meantime, you'll have to:
Matrix::zeros
.view_mut(...)
view.copy_from(&M_11)
Hopefully the new stack! macro will make this a breeze.
stack!
Sorry, something went wrong.
To elaborate, since there's no example in the PR description, you'll be able to write:
let m = stack![ m11, m12; m21, m22 ];
@Andlon Thank you very much! :)
No branches or pull requests
My goal is to construct a symmetric matrix M, which is composed of some known submatrices.
For example, the M I'm gonna construct is
And the submatrix$M_{ij}$ are some known submatrices:
That is to say, the final M matrix is:
I want to know if there is a method in nalgebra that can still efficiently construct M when the size of M is large.
In Python, the numpy has hstack or vstack function to implement my desire.
Is there a function with the same functionality in nalgebra?
The text was updated successfully, but these errors were encountered: