mathru 0.16.2

Fundamental algorithms for scientific computing in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use crate::algebra::linear::matrix::{General, UpperHessenberg};

impl<T> From<General<T>> for UpperHessenberg<T> {
    ///
    /// # Example
    /// ```
    /// use mathru::algebra::linear::matrix::{General, UpperHessenberg};
    /// use mathru::matrix;
    ///
    /// let m: UpperHessenberg<f64> = matrix![1.0, -2.0, 5.0;
    ///                                       2.0, -3.0, 3.0;
    ///                                       0.0, 1.0, -1.5].into();
    /// ```
    fn from(matrix: General<T>) -> Self {
        UpperHessenberg { matrix }
    }
}