Browse Source

LA: ConugateTranspose into provided result matrix #431

v3
Christoph Ruegg 10 years ago
parent
commit
c27534b9a7
  1. 9
      src/Numerics/LinearAlgebra/Complex/Matrix.cs
  2. 9
      src/Numerics/LinearAlgebra/Complex32/Matrix.cs
  3. 8
      src/Numerics/LinearAlgebra/Double/Matrix.cs
  4. 6
      src/Numerics/LinearAlgebra/Matrix.cs
  5. 8
      src/Numerics/LinearAlgebra/Single/Matrix.cs

9
src/Numerics/LinearAlgebra/Complex/Matrix.cs

@ -75,6 +75,15 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
return ret;
}
/// <summary>
/// Puts the conjugate transpose of this matrix into the result matrix.
/// </summary>
public sealed override void ConjugateTranspose(Matrix<Complex> result)
{
Transpose(result);
result.MapInplace(c => c.Conjugate(), Zeros.AllowSkip);
}
/// <summary>
/// Complex conjugates each element of this matrix and place the results into the result matrix.
/// </summary>

9
src/Numerics/LinearAlgebra/Complex32/Matrix.cs

@ -70,6 +70,15 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
return ret;
}
/// <summary>
/// Puts the conjugate transpose of this matrix into the result matrix.
/// </summary>
public sealed override void ConjugateTranspose(Matrix<Complex32> result)
{
Transpose(result);
result.MapInplace(c => c.Conjugate(), Zeros.AllowSkip);
}
/// <summary>
/// Complex conjugates each element of this matrix and place the results into the result matrix.
/// </summary>

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

@ -66,6 +66,14 @@ namespace MathNet.Numerics.LinearAlgebra.Double
return Transpose();
}
/// <summary>
/// Puts the conjugate transpose of this matrix into the result matrix.
/// </summary>
public sealed override void ConjugateTranspose(Matrix<double> result)
{
Transpose(result);
}
/// <summary>
/// Complex conjugates each element of this matrix and place the results into the result matrix.
/// </summary>

6
src/Numerics/LinearAlgebra/Matrix.cs

@ -1005,7 +1005,6 @@ namespace MathNet.Numerics.LinearAlgebra
/// <summary>
/// Puts the transpose of this matrix into the result matrix.
/// </summary>
/// <returns>The transpose of this matrix.</returns>
public void Transpose(Matrix<T> result)
{
Storage.TransposeTo(result.Storage, ExistingData.Clear);
@ -1017,6 +1016,11 @@ namespace MathNet.Numerics.LinearAlgebra
/// <returns>The conjugate transpose of this matrix.</returns>
public abstract Matrix<T> ConjugateTranspose();
/// <summary>
/// Puts the conjugate transpose of this matrix into the result matrix.
/// </summary>
public abstract void ConjugateTranspose(Matrix<T> result);
/// <summary>
/// Permute the rows of a matrix according to a permutation.
/// </summary>

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

@ -66,6 +66,14 @@ namespace MathNet.Numerics.LinearAlgebra.Single
return Transpose();
}
/// <summary>
/// Puts the conjugate transpose of this matrix into the result matrix.
/// </summary>
public sealed override void ConjugateTranspose(Matrix<float> result)
{
Transpose(result);
}
/// <summary>
/// Complex conjugates each element of this matrix and place the results into the result matrix.
/// </summary>

Loading…
Cancel
Save