Browse Source

LA: Drop redundant dense vector ToColumn/RowMatrix overrides

pull/98/head
Christoph Ruegg 13 years ago
parent
commit
2eba91724c
  1. 30
      src/Numerics/LinearAlgebra/Complex/DenseVector.cs
  2. 30
      src/Numerics/LinearAlgebra/Complex32/DenseVector.cs
  3. 30
      src/Numerics/LinearAlgebra/Double/DenseVector.cs
  4. 30
      src/Numerics/LinearAlgebra/Single/DenseVector.cs

30
src/Numerics/LinearAlgebra/Complex/DenseVector.cs

@ -180,36 +180,6 @@ namespace MathNet.Numerics.LinearAlgebra.Complex
return new DenseVector(array);
}
/// <summary>
/// Create a matrix based on this vector in column form (one single column).
/// </summary>
/// <returns>This vector as a column matrix.</returns>
public override Matrix<Complex> ToColumnMatrix()
{
var matrix = new DenseMatrix(_length, 1);
for (var i = 0; i < _values.Length; i++)
{
matrix.At(i, 0, _values[i]);
}
return matrix;
}
/// <summary>
/// Create a matrix based on this vector in row form (one single row).
/// </summary>
/// <returns>This vector as a row matrix.</returns>
public override Matrix<Complex> ToRowMatrix()
{
var matrix = new DenseMatrix(1, _length);
for (var i = 0; i < _values.Length; i++)
{
matrix.At(0, i, _values[i]);
}
return matrix;
}
/// <summary>
/// Creates a matrix with the given dimensions using the same storage type
/// as this vector.

30
src/Numerics/LinearAlgebra/Complex32/DenseVector.cs

@ -180,36 +180,6 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32
return new DenseVector(array);
}
/// <summary>
/// Create a matrix based on this vector in column form (one single column).
/// </summary>
/// <returns>This vector as a column matrix.</returns>
public override Matrix<Complex32> ToColumnMatrix()
{
var matrix = new DenseMatrix(_length, 1);
for (var i = 0; i < _values.Length; i++)
{
matrix.At(i, 0, _values[i]);
}
return matrix;
}
/// <summary>
/// Create a matrix based on this vector in row form (one single row).
/// </summary>
/// <returns>This vector as a row matrix.</returns>
public override Matrix<Complex32> ToRowMatrix()
{
var matrix = new DenseMatrix(1, _length);
for (var i = 0; i < _values.Length; i++)
{
matrix.At(0, i, _values[i]);
}
return matrix;
}
/// <summary>
/// Creates a matrix with the given dimensions using the same storage type
/// as this vector.

30
src/Numerics/LinearAlgebra/Double/DenseVector.cs

@ -180,36 +180,6 @@ namespace MathNet.Numerics.LinearAlgebra.Double
return new DenseVector(array);
}
/// <summary>
/// Create a matrix based on this vector in column form (one single column).
/// </summary>
/// <returns>This vector as a column matrix.</returns>
public override Matrix<double> ToColumnMatrix()
{
var matrix = new DenseMatrix(_length, 1);
for (var i = 0; i < _values.Length; i++)
{
matrix.At(i, 0, _values[i]);
}
return matrix;
}
/// <summary>
/// Create a matrix based on this vector in row form (one single row).
/// </summary>
/// <returns>This vector as a row matrix.</returns>
public override Matrix<double> ToRowMatrix()
{
var matrix = new DenseMatrix(1, _length);
for (var i = 0; i < _values.Length; i++)
{
matrix.At(0, i, _values[i]);
}
return matrix;
}
/// <summary>
/// Creates a matrix with the given dimensions using the same storage type
/// as this vector.

30
src/Numerics/LinearAlgebra/Single/DenseVector.cs

@ -180,36 +180,6 @@ namespace MathNet.Numerics.LinearAlgebra.Single
return new DenseVector(array);
}
/// <summary>
/// Create a matrix based on this vector in column form (one single column).
/// </summary>
/// <returns>This vector as a column matrix.</returns>
public override Matrix<float> ToColumnMatrix()
{
var matrix = new DenseMatrix(_length, 1);
for (var i = 0; i < _values.Length; i++)
{
matrix.At(i, 0, _values[i]);
}
return matrix;
}
/// <summary>
/// Create a matrix based on this vector in row form (one single row).
/// </summary>
/// <returns>This vector as a row matrix.</returns>
public override Matrix<float> ToRowMatrix()
{
var matrix = new DenseMatrix(1, _length);
for (var i = 0; i < _values.Length; i++)
{
matrix.At(0, i, _values[i]);
}
return matrix;
}
/// <summary>
/// Creates a matrix with the given dimensions using the same storage type
/// as this vector.

Loading…
Cancel
Save