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
stack! macro sometimes fails to create block matrices in the situation where
stack!
use nalgebra::{stack, Const, DMatrix, DVector, Dyn, OMatrix, SMatrix, SVector}; fn calc<const D: usize>() -> OMatrix<f64, Const<{ D }>, Dyn> { let mat_a: SMatrix<f64, D, D> = SMatrix::from_element(1.0); let mat_b: SVector<f64, D> = SVector::from_element(1.0); let ret = stack![mat_a, mat_b]; ret } fn calc_dyn1<const D: usize>() -> OMatrix<f64, Const<{ D }>, Dyn> { let mat_a: SMatrix<f64, D, D> = SMatrix::from_element(1.0); let mat_b: DVector<f64> = DVector::from_element(D, 1.0); let ret = stack![mat_a, mat_b]; ret } fn calc_dyn2<const D: usize>() -> OMatrix<f64, Const<{ D }>, Dyn> { let mat_a: SMatrix<f64, D, D> = SMatrix::from_element(1.0); let mat_b: DVector<f64> = DVector::from_element(D, 1.0); let ret = stack![mat_b, mat_a]; ret } fn calc_dyn3<const D: usize>() -> OMatrix<f64, Const<{ D }>, Dyn> { let mat_a = DMatrix::from_element(D, D, 1.0); let mat_b: SVector<f64, D> = SVector::from_element(1.0); let ret = stack![mat_a, mat_b]; ret } fn main() { println!("Hello, world!"); println!("{}", calc::<3>()); // invalid println!("{}", calc_dyn1::<3>()); // invalid println!("{}", calc_dyn2::<3>()); // invalid println!("{}", calc_dyn3::<3>()); // valid }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
stack!
macro sometimes fails to create block matrices in the situation whereThe text was updated successfully, but these errors were encountered: