revert is_hermitian

This commit is contained in:
Xin Hao 2024-07-01 17:40:43 +08:00
parent 448e45ffbe
commit a991c13ddb
2 changed files with 0 additions and 16 deletions

View File

@ -120,13 +120,6 @@ where
self.clone_owned().try_inverse().is_some()
}
/// Returns `true` if this matrix is hermitian.
#[inline]
#[must_use]
pub fn is_hermitian(&self) -> bool {
self.is_square() && self.transpose().conjugate().eq(self)
}
/// Returns `true` if this matrix is unitary.
#[inline]
#[must_use]

View File

@ -201,15 +201,6 @@ fn identity() {
assert!(!not_id3.is_identity(0.0));
}
#[test]
fn is_hermitian() {
let a = Matrix2::new(1.0, 2.0, 3.0, 4.0);
let b = Matrix2::new(1.0, 2.0, 2.0, 1.0);
assert!(!a.is_hermitian());
assert!(b.is_hermitian());
}
#[test]
fn is_unitary() {
let a = Matrix2::new(1.0, 2.0, 3.0, 4.0);