From a991c13ddb9a3e22226cbbc6ee4ce37825dc27c2 Mon Sep 17 00:00:00 2001 From: Xin Hao Date: Mon, 1 Jul 2024 17:40:43 +0800 Subject: [PATCH] revert is_hermitian --- src/base/properties.rs | 7 ------- tests/core/matrix.rs | 9 --------- 2 files changed, 16 deletions(-) diff --git a/src/base/properties.rs b/src/base/properties.rs index 8041a7af..4a305481 100644 --- a/src/base/properties.rs +++ b/src/base/properties.rs @@ -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] diff --git a/tests/core/matrix.rs b/tests/core/matrix.rs index 52355311..756278f4 100644 --- a/tests/core/matrix.rs +++ b/tests/core/matrix.rs @@ -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);