Browse Source

Ported MatrixMultiplyWithUpdate implementation

Ported CholeskyFactor implementation for double and float.
la-knuth
Jurgen Van Gael 17 years ago
parent
commit
4f694b0cf2
  1. 18
      src/Numerics/Algorithms/LinearAlgebra/Atlas/AtlasLinearAlgebraProvider.cs
  2. 3
      src/Numerics/Algorithms/LinearAlgebra/ILinearAlgebraProviderOfT.cs
  3. 1404
      src/Numerics/Algorithms/LinearAlgebra/ManagedLinearAlgebraProvider.cs
  4. 18
      src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.cs
  5. 12
      src/Numerics/Algorithms/LinearAlgebra/NativeAlgebraProvider.include
  6. 5
      src/Numerics/Constants.cs
  7. 13
      src/Numerics/Properties/Resources.Designer.cs
  8. 6
      src/Numerics/Properties/Resources.resx

18
src/Numerics/Algorithms/LinearAlgebra/Atlas/AtlasLinearAlgebraProvider.cs

@ -24,11 +24,7 @@
/* This file is automatically generated - do not modify it. /* This file is automatically generated - do not modify it.
Change NativeLinearAlgebraProvider.include instead. Change NativeLinearAlgebraProvider.include instead.
<<<<<<< HEAD:src/Numerics/Algorithms/LinearAlgebra/Atlas/AtlasLinearAlgebraProvider.cs Last generated on: 28/11/2009 09:32:52
Last generated on: 14/11/2009 20:09:22
=======
Last generated on: 11/13/2009 9:49:35 AM
>>>>>>> c1c4de3... adding dot product:src/Numerics/Algorithms/LinearAlgebra/Atlas/AtlasLinearAlgebraProvider.cs
*/ */
namespace MathNet.Numerics.Algorithms.LinearAlgebra.Atlas namespace MathNet.Numerics.Algorithms.LinearAlgebra.Atlas
{ {
@ -350,8 +346,9 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.Atlas
/// </summary> /// </summary>
/// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the /// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the
/// the Cholesky factorization.</param> /// the Cholesky factorization.</param>
/// <param name="order">The number of rows or columns in the matrix.</param>
/// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks> /// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks>
public void CholeskyFactor(double[] a) public void CholeskyFactor(double[] a, int order)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
@ -846,8 +843,9 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.Atlas
/// </summary> /// </summary>
/// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the /// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the
/// the Cholesky factorization.</param> /// the Cholesky factorization.</param>
/// <param name="order">The number of rows or columns in the matrix.</param>
/// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks> /// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks>
public void CholeskyFactor(float[] a) public void CholeskyFactor(float[] a, int order)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
@ -1342,8 +1340,9 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.Atlas
/// </summary> /// </summary>
/// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the /// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the
/// the Cholesky factorization.</param> /// the Cholesky factorization.</param>
/// <param name="order">The number of rows or columns in the matrix.</param>
/// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks> /// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks>
public void CholeskyFactor(Complex[] a) public void CholeskyFactor(Complex[] a, int order)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
@ -1838,8 +1837,9 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.Atlas
/// </summary> /// </summary>
/// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the /// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the
/// the Cholesky factorization.</param> /// the Cholesky factorization.</param>
/// <param name="order">The number of rows or columns in the matrix.</param>
/// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks> /// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks>
public void CholeskyFactor(Complex32[] a) public void CholeskyFactor(Complex32[] a, int order)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

3
src/Numerics/Algorithms/LinearAlgebra/ILinearAlgebraProviderOfT.cs

@ -294,8 +294,9 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra
/// </summary> /// </summary>
/// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the /// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the
/// the Cholesky factorization.</param> /// the Cholesky factorization.</param>
/// <param name="order">The number of rows or columns in the matrix.</param>
/// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks> /// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks>
void CholeskyFactor(T[] a); void CholeskyFactor(T[] a, int order);
/// <summary> /// <summary>
/// Solves A*X=B for X using Cholesky factorization. /// Solves A*X=B for X using Cholesky factorization.

1404
src/Numerics/Algorithms/LinearAlgebra/ManagedLinearAlgebraProvider.cs

File diff suppressed because it is too large

18
src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.cs

@ -24,11 +24,7 @@
/* This file is automatically generated - do not modify it. /* This file is automatically generated - do not modify it.
Change NativeLinearAlgebraProvider.include instead. Change NativeLinearAlgebraProvider.include instead.
<<<<<<< HEAD:src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.cs Last generated on: 28/11/2009 09:32:55
Last generated on: 14/11/2009 20:09:20
=======
Last generated on: 11/6/2009 3:03:50 PM
>>>>>>> c1c4de3... adding dot product:src/Numerics/Algorithms/LinearAlgebra/Mkl/MklLinearAlgebraProvider.cs
*/ */
namespace MathNet.Numerics.Algorithms.LinearAlgebra.Mkl namespace MathNet.Numerics.Algorithms.LinearAlgebra.Mkl
{ {
@ -350,8 +346,9 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.Mkl
/// </summary> /// </summary>
/// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the /// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the
/// the Cholesky factorization.</param> /// the Cholesky factorization.</param>
/// <param name="order">The number of rows or columns in the matrix.</param>
/// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks> /// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks>
public void CholeskyFactor(double[] a) public void CholeskyFactor(double[] a, int order)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
@ -846,8 +843,9 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.Mkl
/// </summary> /// </summary>
/// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the /// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the
/// the Cholesky factorization.</param> /// the Cholesky factorization.</param>
/// <param name="order">The number of rows or columns in the matrix.</param>
/// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks> /// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks>
public void CholeskyFactor(float[] a) public void CholeskyFactor(float[] a, int order)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
@ -1342,8 +1340,9 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.Mkl
/// </summary> /// </summary>
/// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the /// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the
/// the Cholesky factorization.</param> /// the Cholesky factorization.</param>
/// <param name="order">The number of rows or columns in the matrix.</param>
/// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks> /// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks>
public void CholeskyFactor(Complex[] a) public void CholeskyFactor(Complex[] a, int order)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
@ -1838,8 +1837,9 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.Mkl
/// </summary> /// </summary>
/// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the /// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the
/// the Cholesky factorization.</param> /// the Cholesky factorization.</param>
/// <param name="order">The number of rows or columns in the matrix.</param>
/// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks> /// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks>
public void CholeskyFactor(Complex32[] a) public void CholeskyFactor(Complex32[] a, int order)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

12
src/Numerics/Algorithms/LinearAlgebra/NativeAlgebraProvider.include

@ -346,8 +346,9 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#>
/// </summary> /// </summary>
/// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the /// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the
/// the Cholesky factorization.</param> /// the Cholesky factorization.</param>
/// <param name="order">The number of rows or columns in the matrix.</param>
/// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks> /// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks>
public void CholeskyFactor(double[] a) public void CholeskyFactor(double[] a, int order)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
@ -842,8 +843,9 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#>
/// </summary> /// </summary>
/// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the /// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the
/// the Cholesky factorization.</param> /// the Cholesky factorization.</param>
/// <param name="order">The number of rows or columns in the matrix.</param>
/// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks> /// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks>
public void CholeskyFactor(float[] a) public void CholeskyFactor(float[] a, int order)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
@ -1338,8 +1340,9 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#>
/// </summary> /// </summary>
/// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the /// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the
/// the Cholesky factorization.</param> /// the Cholesky factorization.</param>
/// <param name="order">The number of rows or columns in the matrix.</param>
/// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks> /// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks>
public void CholeskyFactor(Complex[] a) public void CholeskyFactor(Complex[] a, int order)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }
@ -1834,8 +1837,9 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra.<#=library#>
/// </summary> /// </summary>
/// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the /// <param name="a">On entry, a square, positive definite matrix. On exit, the matrix is overwritten with the
/// the Cholesky factorization.</param> /// the Cholesky factorization.</param>
/// <param name="order">The number of rows or columns in the matrix.</param>
/// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks> /// <remarks>This is equivalent to the POTRF LAPACK routine.</remarks>
public void CholeskyFactor(Complex32[] a) public void CholeskyFactor(Complex32[] a, int order)
{ {
throw new NotImplementedException(); throw new NotImplementedException();
} }

5
src/Numerics/Constants.cs

@ -162,6 +162,11 @@ namespace MathNet.Numerics
/// </summary> /// </summary>
public const int SizeOfDouble = sizeof(double); public const int SizeOfDouble = sizeof(double);
/// <summary>
/// The size of a float in bytes.
/// </summary>
public const int SizeOfFloat = sizeof(float);
#endregion #endregion
#region UNIVERSAL CONSTANTS #region UNIVERSAL CONSTANTS

13
src/Numerics/Properties/Resources.Designer.cs

@ -1,7 +1,7 @@
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// <auto-generated> // <auto-generated>
// This code was generated by a tool. // This code was generated by a tool.
// Runtime Version:2.0.50727.4927 // Runtime Version:2.0.50727.4200
// //
// Changes to this file may cause incorrect behavior and will be lost if // Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. // the code is regenerated.
@ -61,7 +61,7 @@ namespace MathNet.Numerics.Properties {
} }
/// <summary> /// <summary>
/// Looks up a localized string similar to All arrays must have the same length.. /// Looks up a localized string similar to The array arguments must have the same length..
/// </summary> /// </summary>
internal static string ArgumentArraysSameLength { internal static string ArgumentArraysSameLength {
get { get {
@ -168,6 +168,15 @@ namespace MathNet.Numerics.Properties {
} }
} }
/// <summary>
/// Looks up a localized string similar to Matrix must be positive definite..
/// </summary>
internal static string ArgumentMatrixPositiveDefinite {
get {
return ResourceManager.GetString("ArgumentMatrixPositiveDefinite", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Matrix column dimensions must agree.. /// Looks up a localized string similar to Matrix column dimensions must agree..
/// </summary> /// </summary>

6
src/Numerics/Properties/Resources.resx

@ -288,4 +288,10 @@
<data name="ProposalDistributionNoUpperBound" xml:space="preserve"> <data name="ProposalDistributionNoUpperBound" xml:space="preserve">
<value>The sampler's proposal distribution is not upper bounding the target density.</value> <value>The sampler's proposal distribution is not upper bounding the target density.</value>
</data> </data>
<data name="ArgumentMatrixPositiveDefinite" xml:space="preserve">
<value>Matrix must be positive definite.</value>
</data>
<data name="ArgumentArraysSameLength" xml:space="preserve">
<value>The array arguments must have the same length.</value>
</data>
</root> </root>
Loading…
Cancel
Save