|
|
|
@ -39,106 +39,7 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra |
|
|
|
/// <summary>
|
|
|
|
/// Interface to linear algebra algorithms that work off 1-D arrays.
|
|
|
|
/// </summary>
|
|
|
|
public interface ILinearAlgebraProvider : ILinearAlgebraProvider<double>, ILinearAlgebraProvider<float>, ILinearAlgebraProvider<Complex>, ILinearAlgebraProvider<Complex32> |
|
|
|
public interface ILinearAlgebraProvider : ILinearAlgebraProvider<double, double>, ILinearAlgebraProvider<float, float>, ILinearAlgebraProvider<Complex, double>, ILinearAlgebraProvider<Complex32, float> |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// Computes the requested <see cref="Norm"/> of the matrix.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="norm">The type of norm to compute.</param>
|
|
|
|
/// <param name="rows">The number of rows.</param>
|
|
|
|
/// <param name="columns">The number of columns.</param>
|
|
|
|
/// <param name="matrix">The matrix to compute the norm from.</param>
|
|
|
|
/// <param name="work">The work array. Only used when <see cref="Norm.InfinityNorm"/>
|
|
|
|
/// and needs to be have a length of at least M (number of rows of <paramref name="matrix"/>.</param>
|
|
|
|
/// <returns>
|
|
|
|
/// The requested <see cref="Norm"/> of the matrix.
|
|
|
|
/// </returns>
|
|
|
|
float MatrixNorm(Norm norm, int rows, int columns, float[] matrix, float[] work); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Computes the requested <see cref="Norm"/> of the matrix.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="norm">The type of norm to compute.</param>
|
|
|
|
/// <param name="rows">The number of rows.</param>
|
|
|
|
/// <param name="columns">The number of columns.</param>
|
|
|
|
/// <param name="matrix">The matrix to compute the norm from.</param>
|
|
|
|
/// <param name="work">The work array. Only used when <see cref="Norm.InfinityNorm"/>
|
|
|
|
/// and needs to be have a length of at least M (number of rows of <paramref name="matrix"/>.</param>
|
|
|
|
/// <returns>
|
|
|
|
/// The requested <see cref="Norm"/> of the matrix.
|
|
|
|
/// </returns>
|
|
|
|
double MatrixNorm(Norm norm, int rows, int columns, double[] matrix, double[] work); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Computes the requested <see cref="Norm"/> of the matrix.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="norm">The type of norm to compute.</param>
|
|
|
|
/// <param name="rows">The number of rows.</param>
|
|
|
|
/// <param name="columns">The number of columns.</param>
|
|
|
|
/// <param name="matrix">The matrix to compute the norm from.</param>
|
|
|
|
/// <param name="work">The work array. Only used when <see cref="Norm.InfinityNorm"/>
|
|
|
|
/// and needs to be have a length of at least M (number of rows of <paramref name="matrix"/>.</param>
|
|
|
|
/// <returns>
|
|
|
|
/// The requested <see cref="Norm"/> of the matrix.
|
|
|
|
/// </returns>
|
|
|
|
Complex32 MatrixNorm(Norm norm, int rows, int columns, Complex32[] matrix, float[] work); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Computes the requested <see cref="Norm"/> of the matrix.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="norm">The type of norm to compute.</param>
|
|
|
|
/// <param name="rows">The number of rows.</param>
|
|
|
|
/// <param name="columns">The number of columns.</param>
|
|
|
|
/// <param name="matrix">The matrix to compute the norm from.</param>
|
|
|
|
/// <param name="work">The work array. Only used when <see cref="Norm.InfinityNorm"/>
|
|
|
|
/// and needs to be have a length of at least M (number of rows of <paramref name="matrix"/>.</param>
|
|
|
|
/// <returns>
|
|
|
|
/// The requested <see cref="Norm"/> of the matrix.
|
|
|
|
/// </returns>
|
|
|
|
Complex MatrixNorm(Norm norm, int rows, int columns, Complex[] matrix, double[] work); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Computes the eigenvalues and eigenvectors of a matrix.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="isSymmetric">Wether the matrix is symmetric or not.</param>
|
|
|
|
/// <param name="order">The order of the matrix.</param>
|
|
|
|
/// <param name="matrix">The matrix to decompose. The lenth of the array must be order * order.</param>
|
|
|
|
/// <param name="matrixEv">On output, the matrix contains the eigen vectors. The lenth of the array must be order * order.</param>
|
|
|
|
/// <param name="vectorEv">On output, the eigen values (λ) of matrix in ascending value. The length of the arry must <paramref name="order"/>.</param>
|
|
|
|
/// <param name="matrixD">On output, the block diagonal eigenvalue matrix. The lenth of the array must be order * order.</param>
|
|
|
|
void EigenDecomp(bool isSymmetric, int order, float[] matrix, float[] matrixEv, Complex[] vectorEv, float[] matrixD); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Computes the eigenvalues and eigenvectors of a matrix.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="isSymmetric">Wether the matrix is symmetric or not.</param>
|
|
|
|
/// <param name="order">The order of the matrix.</param>
|
|
|
|
/// <param name="matrix">The matrix to decompose. The lenth of the array must be order * order.</param>
|
|
|
|
/// <param name="matrixEv">On output, the matrix contains the eigen vectors. The lenth of the array must be order * order.</param>
|
|
|
|
/// <param name="vectorEv">On output, the eigen values (λ) of matrix in ascending value. The length of the arry must <paramref name="order"/>.</param>
|
|
|
|
/// <param name="matrixD">On output, the block diagonal eigenvalue matrix. The lenth of the array must be order * order.</param>
|
|
|
|
void EigenDecomp(bool isSymmetric, int order, double[] matrix, double[] matrixEv, Complex[] vectorEv, double[] matrixD); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Computes the eigenvalues and eigenvectors of a matrix.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="isSymmetric">Wether the matrix is symmetric or not.</param>
|
|
|
|
/// <param name="order">The order of the matrix.</param>
|
|
|
|
/// <param name="matrix">The matrix to decompose. The lenth of the array must be order * order.</param>
|
|
|
|
/// <param name="matrixEv">On output, the matrix contains the eigen vectors. The lenth of the array must be order * order.</param>
|
|
|
|
/// <param name="vectorEv">On output, the eigen values (λ) of matrix in ascending value. The length of the arry must <paramref name="order"/>.</param>
|
|
|
|
/// <param name="matrixD">On output, the block diagonal eigenvalue matrix. The lenth of the array must be order * order.</param>
|
|
|
|
void EigenDecomp(bool isSymmetric, int order, Complex32[] matrix, Complex32[] matrixEv, Complex[] vectorEv, Complex32[] matrixD); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Computes the eigenvalues and eigenvectors of a matrix.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="isSymmetric">Wether the matrix is symmetric or not.</param>
|
|
|
|
/// <param name="order">The order of the matrix.</param>
|
|
|
|
/// <param name="matrix">The matrix to decompose. The lenth of the array must be order * order.</param>
|
|
|
|
/// <param name="matrixEv">On output, the matrix contains the eigen vectors. The lenth of the array must be order * order.</param>
|
|
|
|
/// <param name="vectorEv">On output, the eigen values (λ) of matrix in ascending value. The length of the arry must <paramref name="order"/>.</param>
|
|
|
|
/// <param name="matrixD">On output, the block diagonal eigenvalue matrix. The lenth of the array must be order * order.</param>
|
|
|
|
void EigenDecomp(bool isSymmetric, int order, Complex[] matrix, Complex[] matrixEv, Complex[] vectorEv, Complex[] matrixD); |
|
|
|
} |
|
|
|
} |
|
|
|
|