Browse Source

LA: norml xml docs

optimization-1
Christoph Ruegg 13 years ago
parent
commit
bff2f68396
  1. 12
      src/Numerics/LinearAlgebra/Complex/DenseMatrix.cs
  2. 16
      src/Numerics/LinearAlgebra/Complex/DiagonalMatrix.cs
  3. 12
      src/Numerics/LinearAlgebra/Complex/Matrix.cs
  4. 8
      src/Numerics/LinearAlgebra/Complex/SparseMatrix.cs
  5. 12
      src/Numerics/LinearAlgebra/Complex32/DenseMatrix.cs
  6. 20
      src/Numerics/LinearAlgebra/Complex32/DiagonalMatrix.cs
  7. 12
      src/Numerics/LinearAlgebra/Complex32/Matrix.cs
  8. 8
      src/Numerics/LinearAlgebra/Complex32/SparseMatrix.cs
  9. 12
      src/Numerics/LinearAlgebra/Double/DenseMatrix.cs
  10. 20
      src/Numerics/LinearAlgebra/Double/DiagonalMatrix.cs
  11. 12
      src/Numerics/LinearAlgebra/Double/Matrix.cs
  12. 8
      src/Numerics/LinearAlgebra/Double/SparseMatrix.cs
  13. 24
      src/Numerics/LinearAlgebra/Matrix.Arithmetic.cs
  14. 12
      src/Numerics/LinearAlgebra/Single/DenseMatrix.cs
  15. 20
      src/Numerics/LinearAlgebra/Single/DiagonalMatrix.cs
  16. 12
      src/Numerics/LinearAlgebra/Single/Matrix.cs
  17. 8
      src/Numerics/LinearAlgebra/Single/SparseMatrix.cs

12
src/Numerics/LinearAlgebra/Complex/DenseMatrix.cs

@ -426,22 +426,22 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
return ret;
}
/// <summary>Calculates the L1 norm.</summary>
/// <returns>The L1 norm of the matrix.</returns>
/// <summary>Calculates the induced L1 norm of this matrix.</summary>
/// <returns>The maximum absolute column sum of the matrix.</returns>
public override double L1Norm()
{
return Control.LinearAlgebraProvider.MatrixNorm(Norm.OneNorm, _rowCount, _columnCount, _values);
}
/// <summary>Calculates the infinity norm of this matrix.</summary>
/// <returns>The infinity norm of this matrix.</returns>
/// <summary>Calculates the induced infinity norm of this matrix.</summary>
/// <returns>The maximum absolute row sum of the matrix.</returns>
public override double InfinityNorm()
{
return Control.LinearAlgebraProvider.MatrixNorm(Norm.InfinityNorm, _rowCount, _columnCount, _values);
}
/// <summary>Calculates the Frobenius norm of this matrix.</summary>
/// <returns>The Frobenius norm of this matrix.</returns>
/// <summary>Calculates the entry-wise Frobenius norm of this matrix.</summary>
/// <returns>The square root of the sum of the squared values.</returns>
public override double FrobeniusNorm()
{
return Control.LinearAlgebraProvider.MatrixNorm(Norm.FrobeniusNorm, _rowCount, _columnCount, _values);

16
src/Numerics/LinearAlgebra/Complex/DiagonalMatrix.cs

@ -652,22 +652,22 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
return ret;
}
/// <summary>Calculates the L1 norm.</summary>
/// <returns>The L1 norm of the matrix.</returns>
/// <summary>Calculates the induced L1 norm of this matrix.</summary>
/// <returns>The maximum absolute column sum of the matrix.</returns>
public override double L1Norm()
{
return _data.Aggregate(double.NegativeInfinity, (current, t) => Math.Max(current, t.Magnitude));
return _data.Aggregate(0d, (current, t) => Math.Max(current, t.Magnitude));
}
/// <summary>Calculates the L2 norm.</summary>
/// <returns>The L2 norm of the matrix.</returns>
/// <summary>Calculates the induced L2 norm of the matrix.</summary>
/// <returns>The largest singular value of the matrix.</returns>
public override double L2Norm()
{
return _data.Aggregate(double.NegativeInfinity, (current, t) => Math.Max(current, t.Magnitude));
return _data.Aggregate(0d, (current, t) => Math.Max(current, t.Magnitude));
}
/// <summary>Calculates the infinity norm of this matrix.</summary>
/// <returns>The infinity norm of this matrix.</returns>
/// <summary>Calculates the induced infinity norm of this matrix.</summary>
/// <returns>The maximum absolute row sum of the matrix.</returns>
public override double InfinityNorm()
{
return L1Norm();

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

@ -57,8 +57,8 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
{
}
/// <summary>Calculates the L1 norm.</summary>
/// <returns>The L1 norm of the matrix.</returns>
/// <summary>Calculates the induced L1 norm of this matrix.</summary>
/// <returns>The maximum absolute column sum of the matrix.</returns>
public override double L1Norm()
{
var norm = 0d;
@ -74,8 +74,8 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
return norm;
}
/// <summary>Calculates the infinity norm of this matrix.</summary>
/// <returns>The infinity norm of this matrix.</returns>
/// <summary>Calculates the induced infinity norm of this matrix.</summary>
/// <returns>The maximum absolute row sum of the matrix.</returns>
public override double InfinityNorm()
{
var norm = 0d;
@ -91,8 +91,8 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
return norm;
}
/// <summary>Calculates the Frobenius norm of this matrix.</summary>
/// <returns>The Frobenius norm of this matrix.</returns>
/// <summary>Calculates the entry-wise Frobenius norm of this matrix.</summary>
/// <returns>The square root of the sum of the squared values.</returns>
public override double FrobeniusNorm()
{
var transpose = ConjugateTranspose();

8
src/Numerics/LinearAlgebra/Complex/SparseMatrix.cs

@ -674,8 +674,8 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
return new SparseMatrix(ret);
}
/// <summary>Calculates the infinity norm of this matrix.</summary>
/// <returns>The infinity norm of this matrix.</returns>
/// <summary>Calculates the induced infinity norm of this matrix.</summary>
/// <returns>The maximum absolute row sum of the matrix.</returns>
public override double InfinityNorm()
{
var rowPointers = _storage.RowPointers;
@ -701,8 +701,8 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
return norm;
}
/// <summary>Calculates the Frobenius norm of this matrix.</summary>
/// <returns>The Frobenius norm of this matrix.</returns>
/// <summary>Calculates the entry-wise Frobenius norm of this matrix.</summary>
/// <returns>The square root of the sum of the squared values.</returns>
public override double FrobeniusNorm()
{
var aat = (SparseCompressedRowMatrixStorage<Complex>) (this*ConjugateTranspose()).Storage;

12
src/Numerics/LinearAlgebra/Complex32/DenseMatrix.cs

@ -421,22 +421,22 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
return ret;
}
/// <summary>Calculates the L1 norm.</summary>
/// <returns>The L1 norm of the matrix.</returns>
/// <summary>Calculates the induced L1 norm of this matrix.</summary>
/// <returns>The maximum absolute column sum of the matrix.</returns>
public override double L1Norm()
{
return Control.LinearAlgebraProvider.MatrixNorm(Norm.OneNorm, _rowCount, _columnCount, _values);
}
/// <summary>Calculates the infinity norm of this matrix.</summary>
/// <returns>The infinity norm of this matrix.</returns>
/// <summary>Calculates the induced infinity norm of this matrix.</summary>
/// <returns>The maximum absolute row sum of the matrix.</returns>
public override double InfinityNorm()
{
return Control.LinearAlgebraProvider.MatrixNorm(Norm.InfinityNorm, _rowCount, _columnCount, _values);
}
/// <summary>Calculates the Frobenius norm of this matrix.</summary>
/// <returns>The Frobenius norm of this matrix.</returns>
/// <summary>Calculates the entry-wise Frobenius norm of this matrix.</summary>
/// <returns>The square root of the sum of the squared values.</returns>
public override double FrobeniusNorm()
{
return Control.LinearAlgebraProvider.MatrixNorm(Norm.FrobeniusNorm, _rowCount, _columnCount, _values);

20
src/Numerics/LinearAlgebra/Complex32/DiagonalMatrix.cs

@ -647,29 +647,29 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
return ret;
}
/// <summary>Calculates the L1 norm.</summary>
/// <returns>The L1 norm of the matrix.</returns>
/// <summary>Calculates the induced L1 norm of this matrix.</summary>
/// <returns>The maximum absolute column sum of the matrix.</returns>
public override double L1Norm()
{
return _data.Aggregate(float.NegativeInfinity, (current, t) => Math.Max(current, t.Magnitude));
return _data.Aggregate(0f, (current, t) => Math.Max(current, t.Magnitude));
}
/// <summary>Calculates the L2 norm.</summary>
/// <returns>The L2 norm of the matrix.</returns>
/// <summary>Calculates the induced L2 norm of the matrix.</summary>
/// <returns>The largest singular value of the matrix.</returns>
public override double L2Norm()
{
return _data.Aggregate(float.NegativeInfinity, (current, t) => Math.Max(current, t.Magnitude));
return _data.Aggregate(0f, (current, t) => Math.Max(current, t.Magnitude));
}
/// <summary>Calculates the infinity norm of this matrix.</summary>
/// <returns>The infinity norm of this matrix.</returns>
/// <summary>Calculates the induced infinity norm of this matrix.</summary>
/// <returns>The maximum absolute row sum of the matrix.</returns>
public override double InfinityNorm()
{
return L1Norm();
}
/// <summary>Calculates the Frobenius norm of this matrix.</summary>
/// <returns>The Frobenius norm of this matrix.</returns>
/// <summary>Calculates the entry-wise Frobenius norm of this matrix.</summary>
/// <returns>The square root of the sum of the squared values.</returns>
public override double FrobeniusNorm()
{
return Math.Sqrt(_data.Sum(t => t.Magnitude * t.Magnitude));

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

@ -52,8 +52,8 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
{
}
/// <summary>Calculates the L1 norm.</summary>
/// <returns>The L1 norm of the matrix.</returns>
/// <summary>Calculates the induced L1 norm of this matrix.</summary>
/// <returns>The maximum absolute column sum of the matrix.</returns>
public override double L1Norm()
{
var norm = 0d;
@ -69,8 +69,8 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
return norm;
}
/// <summary>Calculates the infinity norm of this matrix.</summary>
/// <returns>The infinity norm of this matrix.</returns>
/// <summary>Calculates the induced infinity norm of this matrix.</summary>
/// <returns>The maximum absolute row sum of the matrix.</returns>
public override double InfinityNorm()
{
var norm = 0d;
@ -86,8 +86,8 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
return norm;
}
/// <summary>Calculates the Frobenius norm of this matrix.</summary>
/// <returns>The Frobenius norm of this matrix.</returns>
/// <summary>Calculates the entry-wise Frobenius norm of this matrix.</summary>
/// <returns>The square root of the sum of the squared values.</returns>
public override double FrobeniusNorm()
{
var transpose = ConjugateTranspose();

8
src/Numerics/LinearAlgebra/Complex32/SparseMatrix.cs

@ -669,8 +669,8 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
return new SparseMatrix(ret);
}
/// <summary>Calculates the infinity norm of this matrix.</summary>
/// <returns>The infinity norm of this matrix.</returns>
/// <summary>Calculates the induced infinity norm of this matrix.</summary>
/// <returns>The maximum absolute row sum of the matrix.</returns>
public override double InfinityNorm()
{
var rowPointers = _storage.RowPointers;
@ -696,8 +696,8 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
return norm;
}
/// <summary>Calculates the Frobenius norm of this matrix.</summary>
/// <returns>The Frobenius norm of this matrix.</returns>
/// <summary>Calculates the entry-wise Frobenius norm of this matrix.</summary>
/// <returns>The square root of the sum of the squared values.</returns>
public override double FrobeniusNorm()
{
var aat = (SparseCompressedRowMatrixStorage<Complex32>) (this*ConjugateTranspose()).Storage;

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

@ -418,22 +418,22 @@ namespace MathNet.Numerics.LinearAlgebra.Double
return ret;
}
/// <summary>Calculates the L1 norm.</summary>
/// <returns>The L1 norm of the matrix.</returns>
/// <summary>Calculates the induced L1 norm of this matrix.</summary>
/// <returns>The maximum absolute column sum of the matrix.</returns>
public override double L1Norm()
{
return Control.LinearAlgebraProvider.MatrixNorm(Norm.OneNorm, _rowCount, _columnCount, _values);
}
/// <summary>Calculates the infinity norm of this matrix.</summary>
/// <returns>The infinity norm of this matrix.</returns>
/// <summary>Calculates the induced infinity norm of this matrix.</summary>
/// <returns>The maximum absolute row sum of the matrix.</returns>
public override double InfinityNorm()
{
return Control.LinearAlgebraProvider.MatrixNorm(Norm.InfinityNorm, _rowCount, _columnCount, _values);
}
/// <summary>Calculates the Frobenius norm of this matrix.</summary>
/// <returns>The Frobenius norm of this matrix.</returns>
/// <summary>Calculates the entry-wise Frobenius norm of this matrix.</summary>
/// <returns>The square root of the sum of the squared values.</returns>
public override double FrobeniusNorm()
{
return Control.LinearAlgebraProvider.MatrixNorm(Norm.FrobeniusNorm, _rowCount, _columnCount, _values);

20
src/Numerics/LinearAlgebra/Double/DiagonalMatrix.cs

@ -641,29 +641,29 @@ namespace MathNet.Numerics.LinearAlgebra.Double
return ret;
}
/// <summary>Calculates the L1 norm.</summary>
/// <returns>The L1 norm of the matrix.</returns>
/// <summary>Calculates the induced L1 norm of this matrix.</summary>
/// <returns>The maximum absolute column sum of the matrix.</returns>
public override double L1Norm()
{
return _data.Aggregate(double.NegativeInfinity, (current, t) => Math.Max(current, Math.Abs(t)));
return _data.Aggregate(0d, (current, t) => Math.Max(current, Math.Abs(t)));
}
/// <summary>Calculates the L2 norm.</summary>
/// <returns>The L2 norm of the matrix.</returns>
/// <summary>Calculates the induced L2 norm of the matrix.</summary>
/// <returns>The largest singular value of the matrix.</returns>
public override double L2Norm()
{
return _data.Aggregate(double.NegativeInfinity, (current, t) => Math.Max(current, Math.Abs(t)));
return _data.Aggregate(0d, (current, t) => Math.Max(current, Math.Abs(t)));
}
/// <summary>Calculates the infinity norm of this matrix.</summary>
/// <returns>The infinity norm of this matrix.</returns>
/// <summary>Calculates the induced infinity norm of this matrix.</summary>
/// <returns>The maximum absolute row sum of the matrix.</returns>
public override double InfinityNorm()
{
return L1Norm();
}
/// <summary>Calculates the Frobenius norm of this matrix.</summary>
/// <returns>The Frobenius norm of this matrix.</returns>
/// <summary>Calculates the entry-wise Frobenius norm of this matrix.</summary>
/// <returns>The square root of the sum of the squared values.</returns>
public override double FrobeniusNorm()
{
return Math.Sqrt(_data.Sum(t => t * t));

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

@ -50,8 +50,8 @@ namespace MathNet.Numerics.LinearAlgebra.Double
{
}
/// <summary>Calculates the L1 norm.</summary>
/// <returns>The L1 norm of the matrix.</returns>
/// <summary>Calculates the induced L1 norm of this matrix.</summary>
/// <returns>The maximum absolute column sum of the matrix.</returns>
public override double L1Norm()
{
var norm = 0d;
@ -67,8 +67,8 @@ namespace MathNet.Numerics.LinearAlgebra.Double
return norm;
}
/// <summary>Calculates the infinity norm of this matrix.</summary>
/// <returns>The infinity norm of this matrix.</returns>
/// <summary>Calculates the induced infinity norm of this matrix.</summary>
/// <returns>The maximum absolute row sum of the matrix.</returns>
public override double InfinityNorm()
{
var norm = 0d;
@ -84,8 +84,8 @@ namespace MathNet.Numerics.LinearAlgebra.Double
return norm;
}
/// <summary>Calculates the Frobenius norm of this matrix.</summary>
/// <returns>The Frobenius norm of this matrix.</returns>
/// <summary>Calculates the entry-wise Frobenius norm of this matrix.</summary>
/// <returns>The square root of the sum of the squared values.</returns>
public override double FrobeniusNorm()
{
var transpose = Transpose();

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

@ -668,8 +668,8 @@ namespace MathNet.Numerics.LinearAlgebra.Double
return new SparseMatrix(ret);
}
/// <summary>Calculates the infinity norm of this matrix.</summary>
/// <returns>The infinity norm of this matrix.</returns>
/// <summary>Calculates the induced infinity norm of this matrix.</summary>
/// <returns>The maximum absolute row sum of the matrix.</returns>
public override double InfinityNorm()
{
var rowPointers = _storage.RowPointers;
@ -696,8 +696,8 @@ namespace MathNet.Numerics.LinearAlgebra.Double
return norm;
}
/// <summary>Calculates the Frobenius norm of this matrix.</summary>
/// <returns>The Frobenius norm of this matrix.</returns>
/// <summary>Calculates the entry-wise Frobenius norm of this matrix.</summary>
/// <returns>The square root of the sum of the squared values.</returns>
public override double FrobeniusNorm()
{
var aat = (SparseCompressedRowMatrixStorage<double>) (this*Transpose()).Storage;

24
src/Numerics/LinearAlgebra/Matrix.Arithmetic.cs

@ -1148,27 +1148,31 @@ namespace MathNet.Numerics.LinearAlgebra
return ret;
}
/// <summary>Calculates the L1 norm.</summary>
/// <returns>The L1 norm of the matrix.</returns>
/// <summary>Calculates the induced L1 norm of this matrix.</summary>
/// <returns>The maximum absolute column sum of the matrix.</returns>
public abstract double L1Norm();
/// <summary>Calculates the L2 norm.</summary>
/// <returns>The L2 norm of the matrix.</returns>
/// <remarks>For sparse matrices, the L2 norm is computed using a dense implementation of singular value decomposition.
/// In a later release, it will be replaced with a sparse implementation.</remarks>
/// <summary>Calculates the induced L2 norm of the matrix.</summary>
/// <returns>The largest singular value of the matrix.</returns>
/// <remarks>
/// For sparse matrices, the L2 norm is computed using a dense implementation of singular value decomposition.
/// In a later release, it will be replaced with a sparse implementation.
/// </remarks>
public virtual double L2Norm()
{
return Svd(false).L2Norm;
}
/// <summary>Calculates the infinity norm of this matrix.</summary>
/// <returns>The infinity norm of this matrix.</returns>
/// <summary>Calculates the induced infinity norm of this matrix.</summary>
/// <returns>The maximum absolute row sum of the matrix.</returns>
public abstract double InfinityNorm();
/// <summary>Calculates the Frobenius norm of this matrix.</summary>
/// <returns>The Frobenius norm of this matrix.</returns>
/// <summary>Calculates the entry-wise Frobenius norm of this matrix.</summary>
/// <returns>The square root of the sum of the squared values.</returns>
public abstract double FrobeniusNorm();
#region Exceptions - possibly move elsewhere?
internal static Exception DimensionsDontMatch<TException>(Matrix<T> left, Matrix<T> right, Matrix<T> result, string paramName = null)

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

@ -418,22 +418,22 @@ namespace MathNet.Numerics.LinearAlgebra.Single
return ret;
}
/// <summary>Calculates the L1 norm.</summary>
/// <returns>The L1 norm of the matrix.</returns>
/// <summary>Calculates the induced L1 norm of this matrix.</summary>
/// <returns>The maximum absolute column sum of the matrix.</returns>
public override double L1Norm()
{
return Control.LinearAlgebraProvider.MatrixNorm(Norm.OneNorm, _rowCount, _columnCount, _values);
}
/// <summary>Calculates the infinity norm of this matrix.</summary>
/// <returns>The infinity norm of this matrix.</returns>
/// <summary>Calculates the induced infinity norm of this matrix.</summary>
/// <returns>The maximum absolute row sum of the matrix.</returns>
public override double InfinityNorm()
{
return Control.LinearAlgebraProvider.MatrixNorm(Norm.InfinityNorm, _rowCount, _columnCount, _values);
}
/// <summary>Calculates the Frobenius norm of this matrix.</summary>
/// <returns>The Frobenius norm of this matrix.</returns>
/// <summary>Calculates the entry-wise Frobenius norm of this matrix.</summary>
/// <returns>The square root of the sum of the squared values.</returns>
public override double FrobeniusNorm()
{
return Control.LinearAlgebraProvider.MatrixNorm(Norm.FrobeniusNorm, _rowCount, _columnCount, _values);

20
src/Numerics/LinearAlgebra/Single/DiagonalMatrix.cs

@ -641,29 +641,29 @@ namespace MathNet.Numerics.LinearAlgebra.Single
return ret;
}
/// <summary>Calculates the L1 norm.</summary>
/// <returns>The L1 norm of the matrix.</returns>
/// <summary>Calculates the induced L1 norm of this matrix.</summary>
/// <returns>The maximum absolute column sum of the matrix.</returns>
public override double L1Norm()
{
return _data.Aggregate(float.NegativeInfinity, (current, t) => Math.Max(current, Math.Abs(t)));
return _data.Aggregate(0f, (current, t) => Math.Max(current, Math.Abs(t)));
}
/// <summary>Calculates the L2 norm.</summary>
/// <returns>The L2 norm of the matrix.</returns>
/// <summary>Calculates the induced L2 norm of the matrix.</summary>
/// <returns>The largest singular value of the matrix.</returns>
public override double L2Norm()
{
return _data.Aggregate(float.NegativeInfinity, (current, t) => Math.Max(current, Math.Abs(t)));
return _data.Aggregate(0f, (current, t) => Math.Max(current, Math.Abs(t)));
}
/// <summary>Calculates the infinity norm of this matrix.</summary>
/// <returns>The infinity norm of this matrix.</returns>
/// <summary>Calculates the induced infinity norm of this matrix.</summary>
/// <returns>The maximum absolute row sum of the matrix.</returns>
public override double InfinityNorm()
{
return L1Norm();
}
/// <summary>Calculates the Frobenius norm of this matrix.</summary>
/// <returns>The Frobenius norm of this matrix.</returns>
/// <summary>Calculates the entry-wise Frobenius norm of this matrix.</summary>
/// <returns>The square root of the sum of the squared values.</returns>
public override double FrobeniusNorm()
{
return Math.Sqrt(_data.Sum(t => t * t));

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

@ -50,8 +50,8 @@ namespace MathNet.Numerics.LinearAlgebra.Single
{
}
/// <summary>Calculates the L1 norm.</summary>
/// <returns>The L1 norm of the matrix.</returns>
/// <summary>Calculates the induced L1 norm of this matrix.</summary>
/// <returns>The maximum absolute column sum of the matrix.</returns>
public override double L1Norm()
{
var norm = 0d;
@ -67,8 +67,8 @@ namespace MathNet.Numerics.LinearAlgebra.Single
return norm;
}
/// <summary>Calculates the infinity norm of this matrix.</summary>
/// <returns>The infinity norm of this matrix.</returns>
/// <summary>Calculates the induced infinity norm of this matrix.</summary>
/// <returns>The maximum absolute row sum of the matrix.</returns>
public override double InfinityNorm()
{
var norm = 0d;
@ -84,8 +84,8 @@ namespace MathNet.Numerics.LinearAlgebra.Single
return norm;
}
/// <summary>Calculates the Frobenius norm of this matrix.</summary>
/// <returns>The Frobenius norm of this matrix.</returns>
/// <summary>Calculates the entry-wise Frobenius norm of this matrix.</summary>
/// <returns>The square root of the sum of the squared values.</returns>
public override double FrobeniusNorm()
{
var transpose = Transpose();

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

@ -670,8 +670,8 @@ namespace MathNet.Numerics.LinearAlgebra.Single
return new SparseMatrix(ret);
}
/// <summary>Calculates the infinity norm of this matrix.</summary>
/// <returns>The infinity norm of this matrix.</returns>
/// <summary>Calculates the induced infinity norm of this matrix.</summary>
/// <returns>The maximum absolute row sum of the matrix.</returns>
public override double InfinityNorm()
{
var rowPointers = _storage.RowPointers;
@ -700,8 +700,8 @@ namespace MathNet.Numerics.LinearAlgebra.Single
return norm;
}
/// <summary>Calculates the Frobenius norm of this matrix.</summary>
/// <returns>The Frobenius norm of this matrix.</returns>
/// <summary>Calculates the entry-wise Frobenius norm of this matrix.</summary>
/// <returns>The square root of the sum of the squared values.</returns>
public override double FrobeniusNorm()
{
var aat = (SparseCompressedRowMatrixStorage<float>) (this*Transpose()).Storage;

Loading…
Cancel
Save