Type Definition zoea::mtx::DMatrix [−][src]
type DMatrix<N> = Matrix<N, Dynamic, Dynamic, <DefaultAllocator as Allocator<N, Dynamic, Dynamic>>::Buffer>;
Expand description
DMatrix operations
The nalgebra crate contains greate functionality for DMatrix manipulations. The mtx module of Zoea makes it easy to create nalgebra matrices.
Quickstart:
Create a new 5x5 f64 identity matrix and print the first column
use zoea::mtx; let mut m = mtx::new_f64_identity(5); println!("Here is the first column: {}", m.column(0));
Create a 3x1000 f32 random matrix with values between -1 and 1 Create a 1000x4 f32 random matrix with values between 5 and 25
use zoea::mtx; let a: mtx::DMatrix<f32> = mtx::new_f32_random(3, 1000, -1f32, 1f32); let b: mtx::DMatrix<f32> = mtx::new_f32_random(1000, 4, 5f32, 25f32); // multiply a and b and print the result let c: mtx::DMatrix<f32> = a * b; println!("{}", c); // take one of the values and assign it to a float let select_element: f32 = c[(1,3)];
A dynamically sized column-major matrix.