Initial commit
This commit is contained in:
commit
aaa212b9a9
22 changed files with 4778 additions and 0 deletions
16
examples/old/utils.rs
Normal file
16
examples/old/utils.rs
Normal 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue