From 91fa17a0f022d136f1e034e4216a9c0737b69f6b Mon Sep 17 00:00:00 2001 From: Marcus Cuda Date: Wed, 7 Jul 2010 02:42:02 +0800 Subject: [PATCH] lu: merged Andriy's LU additions --- .../Atlas/AtlasLinearAlgebraProvider.cs | 2 +- .../Mkl/MklLinearAlgebraProvider.cs | 2 +- .../NativeAlgebraProvider.include | 97 ++++++++++++------- 3 files changed, 66 insertions(+), 35 deletions(-) diff --git a/src/Numerics/Algorithms/LinearAlgebra/Atlas/AtlasLinearAlgebraProvider.cs b/src/Numerics/Algorithms/LinearAlgebra/Atlas/AtlasLinearAlgebraProvider.cs index a2331ba1..04424c55 100644 --- a/src/Numerics/Algorithms/LinearAlgebra/Atlas/AtlasLinearAlgebraProvider.cs +++ b/src/Numerics/Algorithms/LinearAlgebra/Atlas/AtlasLinearAlgebraProvider.cs @@ -28,7 +28,7 @@ /* This file is automatically generated - do not modify it. Change NativeLinearAlgebraProvider.include instead. - Last generated on UTC 2010-07-04 13:21:14Z + Last generated on UTC 2010-07-06 18:34:45Z */ namespace MathNet.Numerics.Algorithms.LinearAlgebra.Atlas diff --git a/src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.cs b/src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.cs index dbe3826d..5094a665 100644 --- a/src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.cs +++ b/src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.cs @@ -28,7 +28,7 @@ /* This file is automatically generated - do not modify it. Change NativeLinearAlgebraProvider.include instead. - Last generated on UTC 2010-07-04 13:21:48Z + Last generated on UTC 2010-07-06 18:34:52Z */ namespace MathNet.Numerics.Algorithms.LinearAlgebra.Mkl diff --git a/src/Numerics/Algorithms/LinearAlgebra/NativeAlgebraProvider.include b/src/Numerics/Algorithms/LinearAlgebra/NativeAlgebraProvider.include index 4c5f734c..47767bd7 100644 --- a/src/Numerics/Algorithms/LinearAlgebra/NativeAlgebraProvider.include +++ b/src/Numerics/Algorithms/LinearAlgebra/NativeAlgebraProvider.include @@ -361,8 +361,9 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// Computes the inverse of matrix using LU factorization. /// /// The N by N matrix to invert. Contains the inverse On exit. + /// The order of the square matrix . /// This is equivalent to the GETRF and GETRI LAPACK routines. - public void LUInverse(double[] a) + public void LUInverse(double[] a, int order) { throw new NotImplementedException(); } @@ -371,9 +372,10 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// Computes the inverse of a previously factored matrix. /// /// The LU factored N by N matrix. Contains the inverse On exit. + /// The order of the square matrix . /// The pivot indices of . /// This is equivalent to the GETRI LAPACK routine. - public void LUInverseFactored(double[] a, int[] ipiv) + public void LUInverseFactored(double[] a, int order, int[] ipiv) { throw new NotImplementedException(); } @@ -382,11 +384,12 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// Computes the inverse of matrix using LU factorization. /// /// The N by N matrix to invert. Contains the inverse On exit. + /// The order of the square matrix . /// The work array. The array must have a length of at least N, /// but should be N*blocksize. The blocksize is machine dependent. On exit, work[0] contains the optimal /// work size value. /// This is equivalent to the GETRF and GETRI LAPACK routines. - public void LUInverse(double[] a, double[] work) + public void LUInverse(double[] a, int order, double[] work) { throw new NotImplementedException(); } @@ -395,12 +398,13 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// Computes the inverse of a previously factored matrix. /// /// The LU factored N by N matrix. Contains the inverse On exit. + /// The order of the square matrix . /// The pivot indices of . /// The work array. The array must have a length of at least N, /// but should be N*blocksize. The blocksize is machine dependent. On exit, work[0] contains the optimal /// work size value. /// This is equivalent to the GETRI LAPACK routine. - public void LUInverseFactored(double[] a, int[] ipiv, double[] work) + public void LUInverseFactored(double[] a, int order, int[] ipiv, double[] work) { throw new NotImplementedException(); } @@ -410,9 +414,10 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// /// The number of columns of B. /// The square matrix A. + /// The order of the square matrix . /// The B matrix. /// This is equivalent to the GETRF and GETRS LAPACK routines. - public void LUSolve(int columnsOfB, double[] a, double[] b) + public void LUSolve(int columnsOfB, double[] a, int order, double[] b) { throw new NotImplementedException(); } @@ -422,10 +427,11 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// /// The number of columns of B. /// The factored A matrix. + /// The order of the square matrix . /// The pivot indices of . /// The B matrix. /// This is equivalent to the GETRS LAPACK routine. - public void LUSolveFactored(int columnsOfB, double[] a, int ipiv, double[] b) + public void LUSolveFactored(int columnsOfB, double[] a, int order, int[] ipiv, double[] b) { throw new NotImplementedException(); } @@ -436,9 +442,10 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// How to transpose the matrix. /// The number of columns of B. /// The square matrix A. + /// The order of the square matrix . /// The B matrix. /// This is equivalent to the GETRF and GETRS LAPACK routines. - public void LUSolve(Transpose transposeA, int columnsOfB, double[] a, double[] b) + public void LUSolve(Transpose transposeA, int columnsOfB, double[] a, int order, double[] b) { throw new NotImplementedException(); } @@ -449,10 +456,11 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// How to transpose the matrix. /// The number of columns of B. /// The factored A matrix. + /// The order of the square matrix . /// The pivot indices of . /// The B matrix. /// This is equivalent to the GETRS LAPACK routine. - public void LUSolveFactored(Transpose transposeA, int columnsOfB, double[] a, int ipiv, double[] b) + public void LUSolveFactored(Transpose transposeA, int columnsOfB, double[] a, int order, int[] ipiv, double[] b) { throw new NotImplementedException(); } @@ -984,7 +992,6 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> SafeNativeMethods.s_matrix_multiply(transposeA, transposeB, m, n, k, alpha, a, b, beta, c); } - /// /// /// Computes the LUP factorization of A. P*A = L*U. /// @@ -1003,8 +1010,9 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// Computes the inverse of matrix using LU factorization. /// /// The N by N matrix to invert. Contains the inverse On exit. + /// The order of the square matrix . /// This is equivalent to the GETRF and GETRI LAPACK routines. - public void LUInverse(float[] a) + public void LUInverse(float[] a, int order) { throw new NotImplementedException(); } @@ -1013,9 +1021,10 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// Computes the inverse of a previously factored matrix. /// /// The LU factored N by N matrix. Contains the inverse On exit. + /// The order of the square matrix . /// The pivot indices of . /// This is equivalent to the GETRI LAPACK routine. - public void LUInverseFactored(float[] a, int[] ipiv) + public void LUInverseFactored(float[] a, int order, int[] ipiv) { throw new NotImplementedException(); } @@ -1024,11 +1033,12 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// Computes the inverse of matrix using LU factorization. /// /// The N by N matrix to invert. Contains the inverse On exit. + /// The order of the square matrix . /// The work array. The array must have a length of at least N, /// but should be N*blocksize. The blocksize is machine dependent. On exit, work[0] contains the optimal /// work size value. /// This is equivalent to the GETRF and GETRI LAPACK routines. - public void LUInverse(float[] a, float[] work) + public void LUInverse(float[] a, int order, float[] work) { throw new NotImplementedException(); } @@ -1037,12 +1047,13 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// Computes the inverse of a previously factored matrix. /// /// The LU factored N by N matrix. Contains the inverse On exit. + /// The order of the square matrix . /// The pivot indices of . /// The work array. The array must have a length of at least N, /// but should be N*blocksize. The blocksize is machine dependent. On exit, work[0] contains the optimal /// work size value. /// This is equivalent to the GETRI LAPACK routine. - public void LUInverseFactored(float[] a, int[] ipiv, float[] work) + public void LUInverseFactored(float[] a, int order, int[] ipiv, float[] work) { throw new NotImplementedException(); } @@ -1052,9 +1063,10 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// /// The number of columns of B. /// The square matrix A. + /// The order of the square matrix . /// The B matrix. /// This is equivalent to the GETRF and GETRS LAPACK routines. - public void LUSolve(int columnsOfB, float[] a, float[] b) + public void LUSolve(int columnsOfB, float[] a, int order, float[] b) { throw new NotImplementedException(); } @@ -1064,10 +1076,11 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// /// The number of columns of B. /// The factored A matrix. + /// The order of the square matrix . /// The pivot indices of . /// The B matrix. /// This is equivalent to the GETRS LAPACK routine. - public void LUSolveFactored(int columnsOfB, float[] a, int ipiv, float[] b) + public void LUSolveFactored(int columnsOfB, float[] a, int order, int[] ipiv, float[] b) { throw new NotImplementedException(); } @@ -1078,9 +1091,10 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// How to transpose the matrix. /// The number of columns of B. /// The square matrix A. + /// The order of the square matrix . /// The B matrix. /// This is equivalent to the GETRF and GETRS LAPACK routines. - public void LUSolve(Transpose transposeA, int columnsOfB, float[] a, float[] b) + public void LUSolve(Transpose transposeA, int columnsOfB, float[] a, int order, float[] b) { throw new NotImplementedException(); } @@ -1091,10 +1105,11 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// How to transpose the matrix. /// The number of columns of B. /// The factored A matrix. + /// The order of the square matrix . /// The pivot indices of . /// The B matrix. /// This is equivalent to the GETRS LAPACK routine. - public void LUSolveFactored(Transpose transposeA, int columnsOfB, float[] a, int ipiv, float[] b) + public void LUSolveFactored(Transpose transposeA, int columnsOfB, float[] a, int order, int[] ipiv, float[] b) { throw new NotImplementedException(); } @@ -1643,8 +1658,9 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// Computes the inverse of matrix using LU factorization. /// /// The N by N matrix to invert. Contains the inverse On exit. + /// The order of the square matrix . /// This is equivalent to the GETRF and GETRI LAPACK routines. - public void LUInverse(Complex[] a) + public void LUInverse(Complex[] a, int order) { throw new NotImplementedException(); } @@ -1653,9 +1669,10 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// Computes the inverse of a previously factored matrix. /// /// The LU factored N by N matrix. Contains the inverse On exit. + /// The order of the square matrix . /// The pivot indices of . /// This is equivalent to the GETRI LAPACK routine. - public void LUInverseFactored(Complex[] a, int[] ipiv) + public void LUInverseFactored(Complex[] a, int order, int[] ipiv) { throw new NotImplementedException(); } @@ -1664,11 +1681,12 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// Computes the inverse of matrix using LU factorization. /// /// The N by N matrix to invert. Contains the inverse On exit. + /// The order of the square matrix . /// The work array. The array must have a length of at least N, /// but should be N*blocksize. The blocksize is machine dependent. On exit, work[0] contains the optimal /// work size value. /// This is equivalent to the GETRF and GETRI LAPACK routines. - public void LUInverse(Complex[] a, Complex[] work) + public void LUInverse(Complex[] a, int order, Complex[] work) { throw new NotImplementedException(); } @@ -1677,12 +1695,13 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// Computes the inverse of a previously factored matrix. /// /// The LU factored N by N matrix. Contains the inverse On exit. + /// The order of the square matrix . /// The pivot indices of . /// The work array. The array must have a length of at least N, /// but should be N*blocksize. The blocksize is machine dependent. On exit, work[0] contains the optimal /// work size value. /// This is equivalent to the GETRI LAPACK routine. - public void LUInverseFactored(Complex[] a, int[] ipiv, Complex[] work) + public void LUInverseFactored(Complex[] a, int order, int[] ipiv, Complex[] work) { throw new NotImplementedException(); } @@ -1692,9 +1711,10 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// /// The number of columns of B. /// The square matrix A. + /// The order of the square matrix . /// The B matrix. /// This is equivalent to the GETRF and GETRS LAPACK routines. - public void LUSolve(int columnsOfB, Complex[] a, Complex[] b) + public void LUSolve(int columnsOfB, Complex[] a, int order, Complex[] b) { throw new NotImplementedException(); } @@ -1704,10 +1724,11 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// /// The number of columns of B. /// The factored A matrix. + /// The order of the square matrix . /// The pivot indices of . /// The B matrix. /// This is equivalent to the GETRS LAPACK routine. - public void LUSolveFactored(int columnsOfB, Complex[] a, int ipiv, Complex[] b) + public void LUSolveFactored(int columnsOfB, Complex[] a, int order, int[] ipiv, Complex[] b) { throw new NotImplementedException(); } @@ -1718,9 +1739,10 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// How to transpose the matrix. /// The number of columns of B. /// The square matrix A. + /// The order of the square matrix . /// The B matrix. /// This is equivalent to the GETRF and GETRS LAPACK routines. - public void LUSolve(Transpose transposeA, int columnsOfB, Complex[] a, Complex[] b) + public void LUSolve(Transpose transposeA, int columnsOfB, Complex[] a, int order, Complex[] b) { throw new NotImplementedException(); } @@ -1731,10 +1753,11 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// How to transpose the matrix. /// The number of columns of B. /// The factored A matrix. + /// The order of the square matrix . /// The pivot indices of . /// The B matrix. /// This is equivalent to the GETRS LAPACK routine. - public void LUSolveFactored(Transpose transposeA, int columnsOfB, Complex[] a, int ipiv, Complex[] b) + public void LUSolveFactored(Transpose transposeA, int columnsOfB, Complex[] a, int order, int[] ipiv, Complex[] b) { throw new NotImplementedException(); } @@ -2283,8 +2306,9 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// Computes the inverse of matrix using LU factorization. /// /// The N by N matrix to invert. Contains the inverse On exit. + /// The order of the square matrix . /// This is equivalent to the GETRF and GETRI LAPACK routines. - public void LUInverse(Complex32[] a) + public void LUInverse(Complex32[] a, int order) { throw new NotImplementedException(); } @@ -2293,9 +2317,10 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// Computes the inverse of a previously factored matrix. /// /// The LU factored N by N matrix. Contains the inverse On exit. + /// The order of the square matrix . /// The pivot indices of . /// This is equivalent to the GETRI LAPACK routine. - public void LUInverseFactored(Complex32[] a, int[] ipiv) + public void LUInverseFactored(Complex32[] a, int order, int[] ipiv) { throw new NotImplementedException(); } @@ -2304,11 +2329,12 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// Computes the inverse of matrix using LU factorization. /// /// The N by N matrix to invert. Contains the inverse On exit. + /// The order of the square matrix . /// The work array. The array must have a length of at least N, /// but should be N*blocksize. The blocksize is machine dependent. On exit, work[0] contains the optimal /// work size value. /// This is equivalent to the GETRF and GETRI LAPACK routines. - public void LUInverse(Complex32[] a, Complex32[] work) + public void LUInverse(Complex32[] a, int order, Complex32[] work) { throw new NotImplementedException(); } @@ -2317,12 +2343,13 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// Computes the inverse of a previously factored matrix. /// /// The LU factored N by N matrix. Contains the inverse On exit. + /// The order of the square matrix . /// The pivot indices of . /// The work array. The array must have a length of at least N, /// but should be N*blocksize. The blocksize is machine dependent. On exit, work[0] contains the optimal /// work size value. /// This is equivalent to the GETRI LAPACK routine. - public void LUInverseFactored(Complex32[] a, int[] ipiv, Complex32[] work) + public void LUInverseFactored(Complex32[] a, int order, int[] ipiv, Complex32[] work) { throw new NotImplementedException(); } @@ -2332,9 +2359,10 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// /// The number of columns of B. /// The square matrix A. + /// The order of the square matrix . /// The B matrix. /// This is equivalent to the GETRF and GETRS LAPACK routines. - public void LUSolve(int columnsOfB, Complex32[] a, Complex32[] b) + public void LUSolve(int columnsOfB, Complex32[] a, int order, Complex32[] b) { throw new NotImplementedException(); } @@ -2344,10 +2372,11 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// /// The number of columns of B. /// The factored A matrix. + /// The order of the square matrix . /// The pivot indices of . /// The B matrix. /// This is equivalent to the GETRS LAPACK routine. - public void LUSolveFactored(int columnsOfB, Complex32[] a, int ipiv, Complex32[] b) + public void LUSolveFactored(int columnsOfB, Complex32[] a, int order, int[] ipiv, Complex32[] b) { throw new NotImplementedException(); } @@ -2358,9 +2387,10 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// How to transpose the matrix. /// The number of columns of B. /// The square matrix A. + /// The order of the square matrix . /// The B matrix. /// This is equivalent to the GETRF and GETRS LAPACK routines. - public void LUSolve(Transpose transposeA, int columnsOfB, Complex32[] a, Complex32[] b) + public void LUSolve(Transpose transposeA, int columnsOfB, Complex32[] a, int order, Complex32[] b) { throw new NotImplementedException(); } @@ -2371,10 +2401,11 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#> /// How to transpose the matrix. /// The number of columns of B. /// The factored A matrix. + /// The order of the square matrix . /// The pivot indices of . /// The B matrix. /// This is equivalent to the GETRS LAPACK routine. - public void LUSolveFactored(Transpose transposeA, int columnsOfB, Complex32[] a, int ipiv, Complex32[] b) + public void LUSolveFactored(Transpose transposeA, int columnsOfB, Complex32[] a, int order, int[] ipiv, Complex32[] b) { throw new NotImplementedException(); }