Browse Source

LA: drop .Raw

la-knuth
Christoph Ruegg 14 years ago
parent
commit
4099fa98f5
  1. 5
      src/Numerics/LinearAlgebra/Complex/DenseMatrix.cs
  2. 6
      src/Numerics/LinearAlgebra/Complex/DiagonalMatrix.cs
  3. 15
      src/Numerics/LinearAlgebra/Complex/SparseMatrix.cs
  4. 5
      src/Numerics/LinearAlgebra/Complex32/DenseMatrix.cs
  5. 6
      src/Numerics/LinearAlgebra/Complex32/DiagonalMatrix.cs
  6. 15
      src/Numerics/LinearAlgebra/Complex32/SparseMatrix.cs
  7. 5
      src/Numerics/LinearAlgebra/Double/DenseMatrix.cs
  8. 6
      src/Numerics/LinearAlgebra/Double/DiagonalMatrix.cs
  9. 17
      src/Numerics/LinearAlgebra/Double/SparseMatrix.cs
  10. 5
      src/Numerics/LinearAlgebra/Single/DenseMatrix.cs
  11. 6
      src/Numerics/LinearAlgebra/Single/DiagonalMatrix.cs
  12. 17
      src/Numerics/LinearAlgebra/Single/SparseMatrix.cs

5
src/Numerics/LinearAlgebra/Complex/DenseMatrix.cs

@ -61,11 +61,6 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
/// <value>The matrix's data.</value>
readonly Complex[] _data;
internal DenseColumnMajorMatrixStorage<Complex> Raw
{
get { return _storage; }
}
internal DenseMatrix(DenseColumnMajorMatrixStorage<Complex> storage)
: base(storage)
{

6
src/Numerics/LinearAlgebra/Complex/DiagonalMatrix.cs

@ -32,7 +32,6 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
using Generic;
using Properties;
using Storage;
using Threading;
/// <summary>
/// A matrix type for diagonal matrices.
@ -54,11 +53,6 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
/// <value>The matrix's data.</value>
readonly Complex[] _data;
internal DiagonalMatrixStorage<Complex> Raw
{
get { return _storage; }
}
internal DiagonalMatrix(DiagonalMatrixStorage<Complex> storage)
: base(storage)
{

15
src/Numerics/LinearAlgebra/Complex/SparseMatrix.cs

@ -56,11 +56,6 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
get { return _storage.ValueCount; }
}
internal SparseCompressedRowMatrixStorage<Complex> Raw
{
get { return _storage; }
}
internal SparseMatrix(SparseCompressedRowMatrixStorage<Complex> storage)
: base(storage)
{
@ -761,7 +756,7 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
left = sparseOther;
}
var leftStorage = left.Raw;
var leftStorage = left._storage;
for (var i = 0; i < leftStorage.RowCount; i++)
{
// Get the begin / end index for the current row
@ -801,7 +796,7 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
return;
}
var otherStorage = sparseOther.Raw;
var otherStorage = sparseOther._storage;
if (ReferenceEquals(this, sparseResult))
{
@ -901,7 +896,7 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
CopyTo(sparseResult);
}
CommonParallel.For(0, NonZerosCount, index => sparseResult.Raw.Values[index] *= scalar);
CommonParallel.For(0, NonZerosCount, index => sparseResult._storage.Values[index] *= scalar);
}
}
@ -1000,7 +995,7 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
var values = _storage.Values;
var valueCount = _storage.ValueCount;
var otherStorage = otherSparse.Raw;
var otherStorage = otherSparse._storage;
for (var j = 0; j < RowCount; j++)
{
@ -1033,7 +1028,7 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
}
}
resultSparse.Raw.At(i, j, sum + result.At(i, j));
resultSparse._storage.At(i, j, sum + result.At(i, j));
}
}
}

5
src/Numerics/LinearAlgebra/Complex32/DenseMatrix.cs

@ -61,11 +61,6 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
/// <value>The matrix's data.</value>
readonly Complex32[] _data;
internal DenseColumnMajorMatrixStorage<Complex32> Raw
{
get { return _storage; }
}
internal DenseMatrix(DenseColumnMajorMatrixStorage<Complex32> storage)
: base(storage)
{

6
src/Numerics/LinearAlgebra/Complex32/DiagonalMatrix.cs

@ -32,7 +32,6 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
using Numerics;
using Properties;
using Storage;
using Threading;
/// <summary>
/// A matrix type for diagonal matrices.
@ -54,11 +53,6 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
/// <value>The matrix's data.</value>
readonly Complex32[] _data;
internal DiagonalMatrixStorage<Complex32> Raw
{
get { return _storage; }
}
internal DiagonalMatrix(DiagonalMatrixStorage<Complex32> storage)
: base(storage)
{

15
src/Numerics/LinearAlgebra/Complex32/SparseMatrix.cs

@ -56,11 +56,6 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
get { return _storage.ValueCount; }
}
internal SparseCompressedRowMatrixStorage<Complex32> Raw
{
get { return _storage; }
}
internal SparseMatrix(SparseCompressedRowMatrixStorage<Complex32> storage)
: base(storage)
{
@ -761,7 +756,7 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
left = sparseOther;
}
var leftStorage = left.Raw;
var leftStorage = left._storage;
for (var i = 0; i < leftStorage.RowCount; i++)
{
// Get the begin / end index for the current row
@ -800,7 +795,7 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
return;
}
var otherStorage = sparseOther.Raw;
var otherStorage = sparseOther._storage;
if (ReferenceEquals(this, sparseResult))
{
@ -900,7 +895,7 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
CopyTo(sparseResult);
}
CommonParallel.For(0, NonZerosCount, index => sparseResult.Raw.Values[index] *= scalar);
CommonParallel.For(0, NonZerosCount, index => sparseResult._storage.Values[index] *= scalar);
}
}
@ -999,7 +994,7 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
var values = _storage.Values;
var valueCount = _storage.ValueCount;
var otherStorage = otherSparse.Raw;
var otherStorage = otherSparse._storage;
for (var j = 0; j < RowCount; j++)
{
@ -1032,7 +1027,7 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
}
}
resultSparse.Raw.At(i, j, sum + result.At(i, j));
resultSparse._storage.At(i, j, sum + result.At(i, j));
}
}
}

5
src/Numerics/LinearAlgebra/Double/DenseMatrix.cs

@ -61,11 +61,6 @@ namespace MathNet.Numerics.LinearAlgebra.Double
/// <value>The matrix's data.</value>
readonly double[] _data;
internal DenseColumnMajorMatrixStorage<double> Raw
{
get { return _storage; }
}
internal DenseMatrix(DenseColumnMajorMatrixStorage<double> storage)
: base(storage)
{

6
src/Numerics/LinearAlgebra/Double/DiagonalMatrix.cs

@ -31,7 +31,6 @@ namespace MathNet.Numerics.LinearAlgebra.Double
using Generic;
using Properties;
using Storage;
using Threading;
/// <summary>
/// A matrix type for diagonal matrices.
@ -53,11 +52,6 @@ namespace MathNet.Numerics.LinearAlgebra.Double
/// <value>The matrix's data.</value>
readonly double[] _data;
internal DiagonalMatrixStorage<double> Raw
{
get { return _storage; }
}
internal DiagonalMatrix(DiagonalMatrixStorage<double> storage)
: base(storage)
{

17
src/Numerics/LinearAlgebra/Double/SparseMatrix.cs

@ -55,11 +55,6 @@ namespace MathNet.Numerics.LinearAlgebra.Double
get { return _storage.ValueCount; }
}
internal SparseCompressedRowMatrixStorage<double> Raw
{
get { return _storage; }
}
internal SparseMatrix(SparseCompressedRowMatrixStorage<double> storage)
: base(storage)
{
@ -759,7 +754,7 @@ namespace MathNet.Numerics.LinearAlgebra.Double
left = sparseOther;
}
var leftStorage = left.Raw;
var leftStorage = left._storage;
for (var i = 0; i < leftStorage.RowCount; i++)
{
// Get the begin / end index for the current row
@ -799,7 +794,7 @@ namespace MathNet.Numerics.LinearAlgebra.Double
return;
}
var otherStorage = sparseOther.Raw;
var otherStorage = sparseOther._storage;
if (ReferenceEquals(this, sparseResult))
{
@ -899,7 +894,7 @@ namespace MathNet.Numerics.LinearAlgebra.Double
CopyTo(sparseResult);
}
CommonParallel.For(0, _storage.ValueCount, index => sparseResult.Raw.Values[index] *= scalar);
CommonParallel.For(0, _storage.ValueCount, index => sparseResult._storage.Values[index] *= scalar);
}
}
@ -998,7 +993,7 @@ namespace MathNet.Numerics.LinearAlgebra.Double
var values = _storage.Values;
var valueCount = _storage.ValueCount;
var otherStorage = otherSparse.Raw;
var otherStorage = otherSparse._storage;
for (var j = 0; j < RowCount; j++)
{
@ -1031,7 +1026,7 @@ namespace MathNet.Numerics.LinearAlgebra.Double
}
}
resultSparse.Raw.At(i, j, sum + result.At(i, j));
resultSparse._storage.At(i, j, sum + result.At(i, j));
}
}
}
@ -1127,7 +1122,7 @@ namespace MathNet.Numerics.LinearAlgebra.Double
CopyTo(result);
}
var resultStorage = sparseResult.Raw;
var resultStorage = sparseResult._storage;
for (var index = 0; index < resultStorage.Values.Length; index++)
{
resultStorage.Values[index] %= divisor;

5
src/Numerics/LinearAlgebra/Single/DenseMatrix.cs

@ -61,11 +61,6 @@ namespace MathNet.Numerics.LinearAlgebra.Single
/// <value>The matrix's data.</value>
readonly float[] _data;
internal DenseColumnMajorMatrixStorage<float> Raw
{
get { return _storage; }
}
internal DenseMatrix(DenseColumnMajorMatrixStorage<float> storage)
: base(storage)
{

6
src/Numerics/LinearAlgebra/Single/DiagonalMatrix.cs

@ -31,7 +31,6 @@ namespace MathNet.Numerics.LinearAlgebra.Single
using Generic;
using Properties;
using Storage;
using Threading;
/// <summary>
/// A matrix type for diagonal matrices.
@ -53,11 +52,6 @@ namespace MathNet.Numerics.LinearAlgebra.Single
/// <value>The matrix's data.</value>
readonly float[] _data;
internal DiagonalMatrixStorage<float> Raw
{
get { return _storage; }
}
internal DiagonalMatrix(DiagonalMatrixStorage<float> storage)
: base(storage)
{

17
src/Numerics/LinearAlgebra/Single/SparseMatrix.cs

@ -55,11 +55,6 @@ namespace MathNet.Numerics.LinearAlgebra.Single
get { return _storage.ValueCount; }
}
internal SparseCompressedRowMatrixStorage<float> Raw
{
get { return _storage; }
}
internal SparseMatrix(SparseCompressedRowMatrixStorage<float> storage)
: base(storage)
{
@ -759,7 +754,7 @@ namespace MathNet.Numerics.LinearAlgebra.Single
left = sparseOther;
}
var leftStorage = left.Raw;
var leftStorage = left._storage;
for (var i = 0; i < leftStorage.RowCount; i++)
{
// Get the begin / end index for the current row
@ -798,7 +793,7 @@ namespace MathNet.Numerics.LinearAlgebra.Single
return;
}
var otherStorage = sparseOther.Raw;
var otherStorage = sparseOther._storage;
if (ReferenceEquals(this, sparseResult))
{
@ -898,7 +893,7 @@ namespace MathNet.Numerics.LinearAlgebra.Single
CopyTo(sparseResult);
}
CommonParallel.For(0, NonZerosCount, index => sparseResult.Raw.Values[index] *= scalar);
CommonParallel.For(0, NonZerosCount, index => sparseResult._storage.Values[index] *= scalar);
}
}
@ -997,7 +992,7 @@ namespace MathNet.Numerics.LinearAlgebra.Single
var values = _storage.Values;
var valueCount = _storage.ValueCount;
var otherStorage = otherSparse.Raw;
var otherStorage = otherSparse._storage;
for (var j = 0; j < RowCount; j++)
{
@ -1030,7 +1025,7 @@ namespace MathNet.Numerics.LinearAlgebra.Single
}
}
resultSparse.Raw.At(i, j, sum + result.At(i, j));
resultSparse._storage.At(i, j, sum + result.At(i, j));
}
}
}
@ -1126,7 +1121,7 @@ namespace MathNet.Numerics.LinearAlgebra.Single
CopyTo(result);
}
var resultStorage = sparseResult.Raw;
var resultStorage = sparseResult._storage;
for (var index = 0; index < resultStorage.Values.Length; index++)
{
resultStorage.Values[index] %= divisor;

Loading…
Cancel
Save