mathru/algebra/linear/matrix/uppertriangular/partial_eq.rs
1use crate::algebra::linear::matrix::UpperTriangular;
2
3impl<T> PartialEq for UpperTriangular<T>
4where
5 T: PartialEq,
6{
7 /// Checks if two matrices are equal
8 ///
9 /// # Example
10 ///
11 /// ```
12 /// use mathru::algebra::linear::matrix::{General, UpperTriangular};
13 /// use mathru::matrix;
14 ///
15 /// let a: UpperTriangular<f64> = matrix![1.0, 0.0; 3.0, -7.0].into();
16 /// let b: UpperTriangular<f64> = matrix![1.0, 0.0; 3.0, -7.0].into();
17 ///
18 /// assert_eq!(true, a == b);
19 /// ```
20 fn eq(&self, other: &Self) -> bool {
21 self.matrix.eq(&other.matrix)
22 }
23}