From 55b2dbc6a8a608a69b5fa23f6423c55ba88a2a90 Mon Sep 17 00:00:00 2001 From: Christoph Ruegg Date: Thu, 26 Jun 2014 18:43:18 +0200 Subject: [PATCH 1/2] LA: fix bug in Matrix.RemoveRow range checks --- src/Numerics/LinearAlgebra/Matrix.cs | 2 +- .../LinearAlgebraTests/MatrixStructureTheory.Reform.cs | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Numerics/LinearAlgebra/Matrix.cs b/src/Numerics/LinearAlgebra/Matrix.cs index 13d2add5..bc31a785 100644 --- a/src/Numerics/LinearAlgebra/Matrix.cs +++ b/src/Numerics/LinearAlgebra/Matrix.cs @@ -836,7 +836,7 @@ namespace MathNet.Numerics.LinearAlgebra /// If is < zero or > the number of rows. public Matrix RemoveRow(int rowIndex) { - if (rowIndex < 0 || rowIndex > ColumnCount) + if (rowIndex < 0 || rowIndex > RowCount) { throw new ArgumentOutOfRangeException("rowIndex"); } diff --git a/src/UnitTests/LinearAlgebraTests/MatrixStructureTheory.Reform.cs b/src/UnitTests/LinearAlgebraTests/MatrixStructureTheory.Reform.cs index 7efb3095..0405dc91 100644 --- a/src/UnitTests/LinearAlgebraTests/MatrixStructureTheory.Reform.cs +++ b/src/UnitTests/LinearAlgebraTests/MatrixStructureTheory.Reform.cs @@ -134,7 +134,6 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests [Theory] public void CanRemoveRow(Matrix matrix) { - var row = Vector.Build.Random(matrix.ColumnCount, 0); for (var position = 0; position < matrix.RowCount; position++) { var result = matrix.RemoveRow(position); @@ -195,7 +194,6 @@ namespace MathNet.Numerics.UnitTests.LinearAlgebraTests [Theory] public void CanRemoveColumn(Matrix matrix) { - var column = Vector.Build.Random(matrix.RowCount, 0); for (var position = 0; position < matrix.ColumnCount; position++) { var result = matrix.RemoveColumn(position); From 3c91240d7508c91cf9f2a387ba4191fb873e162b Mon Sep 17 00:00:00 2001 From: Christoph Ruegg Date: Thu, 26 Jun 2014 18:53:48 +0200 Subject: [PATCH 2/2] Release: v3.0.2 --- RELEASENOTES.md | 5 ++++- src/FSharp/AssemblyInfo.fs | 6 +++--- src/FSharpUnitTests/AssemblyInfo.fs | 6 +++--- src/Numerics/Properties/AssemblyInfo.cs | 6 +++--- src/UnitTests/Properties/AssemblyInfo.cs | 6 +++--- 5 files changed, 16 insertions(+), 13 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index fcd77ae0..88212fcc 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,4 +1,7 @@ -### 3.0.1 - 2014-06-22 +### 3.0.2 - 2014-06-26 +* Patch release, fixing a bug in Matrix.RemoveRow range checks. + +### 3.0.1 - 2014-06-24 * Patch release, fixing a bug in new Matrix.ToMatrixString and Vector.ToVectorString routines. ### 3.0.0 - 2014-06-21 diff --git a/src/FSharp/AssemblyInfo.fs b/src/FSharp/AssemblyInfo.fs index 3c187d00..ea112a6b 100644 --- a/src/FSharp/AssemblyInfo.fs +++ b/src/FSharp/AssemblyInfo.fs @@ -45,9 +45,9 @@ open System.Runtime.InteropServices [] [] -[] -[] -[] +[] +[] +[] #if PORTABLE #else diff --git a/src/FSharpUnitTests/AssemblyInfo.fs b/src/FSharpUnitTests/AssemblyInfo.fs index 2d45e03b..a7fc5362 100644 --- a/src/FSharpUnitTests/AssemblyInfo.fs +++ b/src/FSharpUnitTests/AssemblyInfo.fs @@ -9,9 +9,9 @@ open System.Runtime.InteropServices [] [] -[] -[] -[] +[] +[] +[] #if PORTABLE #else diff --git a/src/Numerics/Properties/AssemblyInfo.cs b/src/Numerics/Properties/AssemblyInfo.cs index 0ff7eb9f..6c4c9389 100644 --- a/src/Numerics/Properties/AssemblyInfo.cs +++ b/src/Numerics/Properties/AssemblyInfo.cs @@ -45,9 +45,9 @@ using System.Runtime.InteropServices; [assembly: CLSCompliant(true)] [assembly: NeutralResourcesLanguage("en")] -[assembly: AssemblyVersion("3.0.1.0")] -[assembly: AssemblyFileVersion("3.0.1.0")] -[assembly: AssemblyInformationalVersion("3.0.1")] +[assembly: AssemblyVersion("3.0.2.0")] +[assembly: AssemblyFileVersion("3.0.2.0")] +[assembly: AssemblyInformationalVersion("3.0.2")] #if PORTABLE diff --git a/src/UnitTests/Properties/AssemblyInfo.cs b/src/UnitTests/Properties/AssemblyInfo.cs index 69238324..4925bfe8 100644 --- a/src/UnitTests/Properties/AssemblyInfo.cs +++ b/src/UnitTests/Properties/AssemblyInfo.cs @@ -8,8 +8,8 @@ using MathNet.Numerics.UnitTests; [assembly: ComVisible(false)] [assembly: Guid("04157581-63f3-447b-a277-83c6e69126a4")] -[assembly: AssemblyVersion("3.0.1.0")] -[assembly: AssemblyFileVersion("3.0.1.0")] -[assembly: AssemblyInformationalVersion("3.0.1")] +[assembly: AssemblyVersion("3.0.2.0")] +[assembly: AssemblyFileVersion("3.0.2.0")] +[assembly: AssemblyInformationalVersion("3.0.2")] [assembly: UseLinearAlgebraProvider]