Initial commit

This commit is contained in:
Pascal Engélibert 2023-11-16 23:28:16 +01:00
commit aaa212b9a9
22 changed files with 4778 additions and 0 deletions

16
examples/old/utils.rs Normal file
View file

@ -0,0 +1,16 @@
use nalgebra::base::*;
/// `<Type, Rows, Columns>`
pub type Mat<T, const R: usize, const C: usize> =
Matrix<T, Const<R>, Const<C>, ArrayStorage<T, R, C>>;
pub type Vect<T, const R: usize> = Matrix<T, Const<R>, U1, ArrayStorage<T, R, 1>>;
pub fn max(l: &[f64]) -> f64 {
let mut m = l[0];
for &i in &l[1..] {
if i > m {
m = i;
}
}
m
}