Browse Source

Sparse Linear Algebra: minor add/subtract optimization, gh-18.

la-knuth
Christoph Ruegg 15 years ago
parent
commit
f754a121f7
  1. 2
      src/Numerics/LinearAlgebra/Complex/SparseVector.cs
  2. 2
      src/Numerics/LinearAlgebra/Complex32/SparseVector.cs
  3. 2
      src/Numerics/LinearAlgebra/Double/SparseVector.cs
  4. 2
      src/Numerics/LinearAlgebra/Single/SparseVector.cs

2
src/Numerics/LinearAlgebra/Complex/SparseVector.cs

@ -430,7 +430,6 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
}
else if (j >= otherSparse.NonZerosCount || i < NonZerosCount && _nonZeroIndices[i] < otherSparse._nonZeroIndices[j])
{
_nonZeroValues[i] += otherSparse.At(_nonZeroIndices[i]);
i++;
}
else
@ -577,7 +576,6 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
}
else if (j >= otherSparse.NonZerosCount || i < NonZerosCount && _nonZeroIndices[i] < otherSparse._nonZeroIndices[j])
{
_nonZeroValues[i] -= otherSparse.At(_nonZeroIndices[i]);
i++;
}
else

2
src/Numerics/LinearAlgebra/Complex32/SparseVector.cs

@ -460,7 +460,6 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
}
else if (j >= otherSparse.NonZerosCount || i < NonZerosCount && _nonZeroIndices[i] < otherSparse._nonZeroIndices[j])
{
_nonZeroValues[i] += otherSparse.At(_nonZeroIndices[i]);
i++;
}
else
@ -607,7 +606,6 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
}
else if (j >= otherSparse.NonZerosCount || i < NonZerosCount && _nonZeroIndices[i] < otherSparse._nonZeroIndices[j])
{
_nonZeroValues[i] -= otherSparse.At(_nonZeroIndices[i]);
i++;
}
else

2
src/Numerics/LinearAlgebra/Double/SparseVector.cs

@ -378,7 +378,6 @@ namespace MathNet.Numerics.LinearAlgebra.Double
}
else if (j >= otherSparse.NonZerosCount || i < NonZerosCount && _nonZeroIndices[i] < otherSparse._nonZeroIndices[j])
{
_nonZeroValues[i] += otherSparse.At(_nonZeroIndices[i]);
i++;
}
else
@ -525,7 +524,6 @@ namespace MathNet.Numerics.LinearAlgebra.Double
}
else if (j >= otherSparse.NonZerosCount || i < NonZerosCount && _nonZeroIndices[i] < otherSparse._nonZeroIndices[j])
{
_nonZeroValues[i] -= otherSparse.At(_nonZeroIndices[i]);
i++;
}
else

2
src/Numerics/LinearAlgebra/Single/SparseVector.cs

@ -408,7 +408,6 @@ namespace MathNet.Numerics.LinearAlgebra.Single
}
else if (j >= otherSparse.NonZerosCount || i < NonZerosCount && _nonZeroIndices[i] < otherSparse._nonZeroIndices[j])
{
_nonZeroValues[i] += otherSparse.At(_nonZeroIndices[i]);
i++;
}
else
@ -555,7 +554,6 @@ namespace MathNet.Numerics.LinearAlgebra.Single
}
else if (j >= otherSparse.NonZerosCount || i < NonZerosCount && _nonZeroIndices[i] < otherSparse._nonZeroIndices[j])
{
_nonZeroValues[i] -= otherSparse.At(_nonZeroIndices[i]);
i++;
}
else

Loading…
Cancel
Save