From 2a8ae8776524ad9f0a38933c26173b4a0dbbe684 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 21 Nov 2011 15:48:29 +0200 Subject: [PATCH] Seal ConjugateTranspose() for double/single and remove redundant overrides For non-complex matrices, the ConjugateTranspose is the same as the transpose. Therefore, a sealed override for ConjugateTranspose() that simply forwards the call to Transpose() makes sense for double/single matrices. Signed-off-by: Alexander Karatarakis --- src/Numerics/LinearAlgebra/Double/DenseMatrix.cs | 9 --------- src/Numerics/LinearAlgebra/Double/Matrix.cs | 2 +- src/Numerics/LinearAlgebra/Single/DenseMatrix.cs | 9 --------- src/Numerics/LinearAlgebra/Single/Matrix.cs | 2 +- 4 files changed, 2 insertions(+), 20 deletions(-) diff --git a/src/Numerics/LinearAlgebra/Double/DenseMatrix.cs b/src/Numerics/LinearAlgebra/Double/DenseMatrix.cs index 64f233d9..daeaae36 100644 --- a/src/Numerics/LinearAlgebra/Double/DenseMatrix.cs +++ b/src/Numerics/LinearAlgebra/Double/DenseMatrix.cs @@ -629,15 +629,6 @@ namespace MathNet.Numerics.LinearAlgebra.Double } } - /// - /// Returns the conjugate transpose of this matrix. - /// - /// The conjugate transpose of this matrix. - public override Matrix ConjugateTranspose() - { - return Transpose(); - } - /// /// Computes the trace of this matrix. /// diff --git a/src/Numerics/LinearAlgebra/Double/Matrix.cs b/src/Numerics/LinearAlgebra/Double/Matrix.cs index 811d1ab1..c395ca25 100644 --- a/src/Numerics/LinearAlgebra/Double/Matrix.cs +++ b/src/Numerics/LinearAlgebra/Double/Matrix.cs @@ -84,7 +84,7 @@ namespace MathNet.Numerics.LinearAlgebra.Double /// Returns the conjugate transpose of this matrix. /// /// The conjugate transpose of this matrix. - public override Matrix ConjugateTranspose() + public override sealed Matrix ConjugateTranspose() { return Transpose(); } diff --git a/src/Numerics/LinearAlgebra/Single/DenseMatrix.cs b/src/Numerics/LinearAlgebra/Single/DenseMatrix.cs index bbabcc2c..0d1dcbcd 100644 --- a/src/Numerics/LinearAlgebra/Single/DenseMatrix.cs +++ b/src/Numerics/LinearAlgebra/Single/DenseMatrix.cs @@ -628,15 +628,6 @@ namespace MathNet.Numerics.LinearAlgebra.Single } } - /// - /// Returns the conjugate transpose of this matrix. - /// - /// The conjugate transpose of this matrix. - public override Matrix ConjugateTranspose() - { - return Transpose(); - } - /// /// Computes the trace of this matrix. /// diff --git a/src/Numerics/LinearAlgebra/Single/Matrix.cs b/src/Numerics/LinearAlgebra/Single/Matrix.cs index 144b3c73..e2e0211e 100644 --- a/src/Numerics/LinearAlgebra/Single/Matrix.cs +++ b/src/Numerics/LinearAlgebra/Single/Matrix.cs @@ -84,7 +84,7 @@ namespace MathNet.Numerics.LinearAlgebra.Single /// Returns the conjugate transpose of this matrix. /// /// The conjugate transpose of this matrix. - public override Matrix ConjugateTranspose() + public override sealed Matrix ConjugateTranspose() { return Transpose(); }