Browse Source

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 <alex@karatarakis.com>
la-knuth
Alexander Karatarakis 15 years ago
committed by Christoph Ruegg
parent
commit
2a8ae87765
  1. 9
      src/Numerics/LinearAlgebra/Double/DenseMatrix.cs
  2. 2
      src/Numerics/LinearAlgebra/Double/Matrix.cs
  3. 9
      src/Numerics/LinearAlgebra/Single/DenseMatrix.cs
  4. 2
      src/Numerics/LinearAlgebra/Single/Matrix.cs

9
src/Numerics/LinearAlgebra/Double/DenseMatrix.cs

@ -629,15 +629,6 @@ namespace MathNet.Numerics.LinearAlgebra.Double
} }
} }
/// <summary>
/// Returns the conjugate transpose of this matrix.
/// </summary>
/// <returns>The conjugate transpose of this matrix.</returns>
public override Matrix<double> ConjugateTranspose()
{
return Transpose();
}
/// <summary> /// <summary>
/// Computes the trace of this matrix. /// Computes the trace of this matrix.
/// </summary> /// </summary>

2
src/Numerics/LinearAlgebra/Double/Matrix.cs

@ -84,7 +84,7 @@ namespace MathNet.Numerics.LinearAlgebra.Double
/// Returns the conjugate transpose of this matrix. /// Returns the conjugate transpose of this matrix.
/// </summary> /// </summary>
/// <returns>The conjugate transpose of this matrix.</returns> /// <returns>The conjugate transpose of this matrix.</returns>
public override Matrix<double> ConjugateTranspose() public override sealed Matrix<double> ConjugateTranspose()
{ {
return Transpose(); return Transpose();
} }

9
src/Numerics/LinearAlgebra/Single/DenseMatrix.cs

@ -628,15 +628,6 @@ namespace MathNet.Numerics.LinearAlgebra.Single
} }
} }
/// <summary>
/// Returns the conjugate transpose of this matrix.
/// </summary>
/// <returns>The conjugate transpose of this matrix.</returns>
public override Matrix<float> ConjugateTranspose()
{
return Transpose();
}
/// <summary> /// <summary>
/// Computes the trace of this matrix. /// Computes the trace of this matrix.
/// </summary> /// </summary>

2
src/Numerics/LinearAlgebra/Single/Matrix.cs

@ -84,7 +84,7 @@ namespace MathNet.Numerics.LinearAlgebra.Single
/// Returns the conjugate transpose of this matrix. /// Returns the conjugate transpose of this matrix.
/// </summary> /// </summary>
/// <returns>The conjugate transpose of this matrix.</returns> /// <returns>The conjugate transpose of this matrix.</returns>
public override Matrix<float> ConjugateTranspose() public override sealed Matrix<float> ConjugateTranspose()
{ {
return Transpose(); return Transpose();
} }

Loading…
Cancel
Save