(mat: &Matrix)
| 157 | |
| 158 | |
| 159 | pub fn max_matrix(mat: &Matrix) -> f64 { |
| 160 | let mut max = mat[0][0].abs(); |
| 161 | for x in mat { |
| 162 | for x in x { |
| 163 | let x = x.abs(); |
| 164 | if x > max { |
| 165 | max = x; |
| 166 | } |
| 167 | } |
| 168 | } |
| 169 | max |
| 170 | } |
| 171 | |
| 172 | pub fn min_matrix(mat: &Matrix) -> f64 { |
| 173 | let mut min = mat[0][0].abs(); |