16 lines
347 B
Rust
16 lines
347 B
Rust
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
|
|
}
|