From 2eba91724cac4b29bfebecb2287e0b10ccd986cb Mon Sep 17 00:00:00 2001 From: Christoph Ruegg Date: Sun, 24 Feb 2013 16:31:38 +0100 Subject: [PATCH] LA: Drop redundant dense vector ToColumn/RowMatrix overrides --- .../LinearAlgebra/Complex/DenseVector.cs | 30 ------------------- .../LinearAlgebra/Complex32/DenseVector.cs | 30 ------------------- .../LinearAlgebra/Double/DenseVector.cs | 30 ------------------- .../LinearAlgebra/Single/DenseVector.cs | 30 ------------------- 4 files changed, 120 deletions(-) diff --git a/src/Numerics/LinearAlgebra/Complex/DenseVector.cs b/src/Numerics/LinearAlgebra/Complex/DenseVector.cs index 976a1844..656b6f9d 100644 --- a/src/Numerics/LinearAlgebra/Complex/DenseVector.cs +++ b/src/Numerics/LinearAlgebra/Complex/DenseVector.cs @@ -180,36 +180,6 @@ namespace MathNet.Numerics.LinearAlgebra.Complex return new DenseVector(array); } - /// - /// Create a matrix based on this vector in column form (one single column). - /// - /// This vector as a column matrix. - public override Matrix ToColumnMatrix() - { - var matrix = new DenseMatrix(_length, 1); - for (var i = 0; i < _values.Length; i++) - { - matrix.At(i, 0, _values[i]); - } - - return matrix; - } - - /// - /// Create a matrix based on this vector in row form (one single row). - /// - /// This vector as a row matrix. - public override Matrix ToRowMatrix() - { - var matrix = new DenseMatrix(1, _length); - for (var i = 0; i < _values.Length; i++) - { - matrix.At(0, i, _values[i]); - } - - return matrix; - } - /// /// Creates a matrix with the given dimensions using the same storage type /// as this vector. diff --git a/src/Numerics/LinearAlgebra/Complex32/DenseVector.cs b/src/Numerics/LinearAlgebra/Complex32/DenseVector.cs index f5c388c9..b384b390 100644 --- a/src/Numerics/LinearAlgebra/Complex32/DenseVector.cs +++ b/src/Numerics/LinearAlgebra/Complex32/DenseVector.cs @@ -180,36 +180,6 @@ namespace MathNet.Numerics.LinearAlgebra.Complex32 return new DenseVector(array); } - /// - /// Create a matrix based on this vector in column form (one single column). - /// - /// This vector as a column matrix. - public override Matrix ToColumnMatrix() - { - var matrix = new DenseMatrix(_length, 1); - for (var i = 0; i < _values.Length; i++) - { - matrix.At(i, 0, _values[i]); - } - - return matrix; - } - - /// - /// Create a matrix based on this vector in row form (one single row). - /// - /// This vector as a row matrix. - public override Matrix ToRowMatrix() - { - var matrix = new DenseMatrix(1, _length); - for (var i = 0; i < _values.Length; i++) - { - matrix.At(0, i, _values[i]); - } - - return matrix; - } - /// /// Creates a matrix with the given dimensions using the same storage type /// as this vector. diff --git a/src/Numerics/LinearAlgebra/Double/DenseVector.cs b/src/Numerics/LinearAlgebra/Double/DenseVector.cs index 66e91029..e5fa5159 100644 --- a/src/Numerics/LinearAlgebra/Double/DenseVector.cs +++ b/src/Numerics/LinearAlgebra/Double/DenseVector.cs @@ -180,36 +180,6 @@ namespace MathNet.Numerics.LinearAlgebra.Double return new DenseVector(array); } - /// - /// Create a matrix based on this vector in column form (one single column). - /// - /// This vector as a column matrix. - public override Matrix ToColumnMatrix() - { - var matrix = new DenseMatrix(_length, 1); - for (var i = 0; i < _values.Length; i++) - { - matrix.At(i, 0, _values[i]); - } - - return matrix; - } - - /// - /// Create a matrix based on this vector in row form (one single row). - /// - /// This vector as a row matrix. - public override Matrix ToRowMatrix() - { - var matrix = new DenseMatrix(1, _length); - for (var i = 0; i < _values.Length; i++) - { - matrix.At(0, i, _values[i]); - } - - return matrix; - } - /// /// Creates a matrix with the given dimensions using the same storage type /// as this vector. diff --git a/src/Numerics/LinearAlgebra/Single/DenseVector.cs b/src/Numerics/LinearAlgebra/Single/DenseVector.cs index 9ed5bd64..3dd63186 100644 --- a/src/Numerics/LinearAlgebra/Single/DenseVector.cs +++ b/src/Numerics/LinearAlgebra/Single/DenseVector.cs @@ -180,36 +180,6 @@ namespace MathNet.Numerics.LinearAlgebra.Single return new DenseVector(array); } - /// - /// Create a matrix based on this vector in column form (one single column). - /// - /// This vector as a column matrix. - public override Matrix ToColumnMatrix() - { - var matrix = new DenseMatrix(_length, 1); - for (var i = 0; i < _values.Length; i++) - { - matrix.At(i, 0, _values[i]); - } - - return matrix; - } - - /// - /// Create a matrix based on this vector in row form (one single row). - /// - /// This vector as a row matrix. - public override Matrix ToRowMatrix() - { - var matrix = new DenseMatrix(1, _length); - for (var i = 0; i < _values.Length; i++) - { - matrix.At(0, i, _values[i]); - } - - return matrix; - } - /// /// Creates a matrix with the given dimensions using the same storage type /// as this vector.