Browse Source

added missing commit

pull/36/head
Marcus Cuda 16 years ago
parent
commit
03f613852e
  1. 7
      src/MathNet.Numerics.5.0.ReSharper
  2. 17
      src/Numerics/Algorithms/LinearAlgebra/ManagedLinearAlgebraProvider.cs
  3. 3
      src/Numerics/Properties/Resources.resx

7
src/MathNet.Numerics.5.0.ReSharper

@ -11,7 +11,12 @@
<Name>en-US</Name>
<CaseSensitive>false</CaseSensitive>
<UserWords>pointwise
Frobenius</UserWords>
Frobenius
indices
ipiv
blocksize
Dont
Cholesky</UserWords>
</CustomDictionary>
</Dictionaries>
</CustomDictionaries>

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

@ -1037,7 +1037,8 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra
if (work.Length < rRows * rRows)
{
throw new ArgumentException(Resources.ArgumentArraysSameLength, "work");
work[0] = rRows * rRows;
throw new ArgumentException(Resources.WorkArrayTooSmall, "work");
}
CommonParallel.For(0, rRows, i => q[(i * rRows) + i] = 1.0);
@ -1502,9 +1503,8 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra
if (work.Length < aRows)
{
// TODO: Actually "work = new double[aRows]" is acceptable size of work array. I set size proposed in method description
work[0] = Math.Max((3 * Math.Min(aRows, aColumns)) + Math.Max(aRows, aColumns), 5 * Math.Min(aRows, aColumns));
return;
work[0] = aRows;
throw new ArgumentException(Resources.WorkArrayTooSmall, "work");
}
const int Maxiter = 1000;
@ -2172,8 +2172,8 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra
if (work.Length < aRows)
{
work[0] = Math.Max(3 * Math.Min(aRows, aColumns) + Math.Max(aRows, aColumns), 5 * Math.Min(aRows, aColumns));
return;
work[0] = aRows;
throw new ArgumentException(Resources.WorkArrayTooSmall, "work");
}
const int Maxiter = 1000;
@ -2965,9 +2965,8 @@ namespace MathNet.Numerics.Algorithms.LinearAlgebra
if (work.Length < aRows)
{
// TODO: Actually "work = new double[aRows]" is acceptable size of work array. I set size proposed in method description
work[0] = Math.Max((3 * Math.Min(aRows, aColumns)) + Math.Max(aRows, aColumns), 5 * Math.Min(aRows, aColumns));
return;
work[0] = aRows;
throw new ArgumentException(Resources.WorkArrayTooSmall, "work");
}
SingularValueDecomposition(true, a, aRows, aColumns, s, u, vt, work);

3
src/Numerics/Properties/Resources.resx

@ -309,4 +309,7 @@
<data name="SingularVectorsNotComputed" xml:space="preserve">
<value>The singular vectors were not computed.</value>
</data>
<data name="WorkArrayTooSmall" xml:space="preserve">
<value>The given work array is too small. Check work[0] for the corret size.</value>
</data>
</root>
Loading…
Cancel
Save