From a8bd33e9ba6ad69cc13bc524a9ab89e6405a32fe Mon Sep 17 00:00:00 2001 From: Christoph Ruegg Date: Sat, 29 Apr 2017 15:20:39 +0200 Subject: [PATCH] Optimization: cleanup test file headers --- .../OptimizationTests/BfgsBMinimizerTests.cs | 6 +-- .../OptimizationTests/BfgsMinimizerTests.cs | 32 +++++++++++++++- src/UnitTests/OptimizationTests/BfgsTest.cs | 4 +- .../ConjugateGradientMinimizerTests.cs | 31 +++++++++++++++- .../GoldenSectionMinimizerTests.cs | 31 +++++++++++++++- ...ionAdapters.cs => MghObjectiveFunction.cs} | 35 +++++++++++++++--- .../NelderMeadSimplexTests.cs | 3 +- .../OptimizationTests/NewtonMinimizerTests.cs | 31 +++++++++++++++- .../RosenbrockFunctionTests.cs | 32 +++++++++++++++- .../TestCaseDataExtensions.cs | 36 +++++++++++++++--- .../OptimizationTests/TestFunctionTests.cs | 33 +++++++++++++++-- .../TestFunctions/BaseTestFunction.cs | 37 ++++++++++++++++--- .../TestFunctions/BealeFunction.cs | 34 +++++++++++++++-- .../TestFunctions/BrownAndDennisFunction.cs | 34 +++++++++++++++-- .../TestFunctions/BrownBadlyScaledFunction.cs | 34 +++++++++++++++-- .../FreudensteinAndRothFunction.cs | 35 +++++++++++++++--- .../TestFunctions/HelicalValleyFunction.cs | 34 +++++++++++++++-- .../TestFunctions/ITestFunction.cs | 36 +++++++++++++++--- .../JennrichAndSampsonFunction.cs | 34 +++++++++++++++-- .../TestFunctions/MeyerFunction.cs | 34 +++++++++++++++-- .../PowellBadlyScaledFunction.cs | 35 +++++++++++++++--- .../TestFunctions/PowellSingularFunction.cs | 34 +++++++++++++++-- .../{ => TestFunctions}/RosenbrockFunction.cs | 33 ++++++++++++++++- .../TestFunctions/RosenbrockFunction2.cs | 33 +++++++++++++++-- .../TestFunctions/WoodFunction.cs | 34 +++++++++++++++-- src/UnitTests/UnitTests.csproj | 6 +-- 26 files changed, 668 insertions(+), 93 deletions(-) rename src/UnitTests/OptimizationTests/{TestFunctionAdapters.cs => MghObjectiveFunction.cs} (55%) rename src/UnitTests/OptimizationTests/{ => TestFunctions}/RosenbrockFunction.cs (57%) diff --git a/src/UnitTests/OptimizationTests/BfgsBMinimizerTests.cs b/src/UnitTests/OptimizationTests/BfgsBMinimizerTests.cs index cb4c5547..6e270172 100644 --- a/src/UnitTests/OptimizationTests/BfgsBMinimizerTests.cs +++ b/src/UnitTests/OptimizationTests/BfgsBMinimizerTests.cs @@ -1,10 +1,9 @@ -// +// // Math.NET Numerics, part of the Math.NET Project // http://numerics.mathdotnet.com // http://github.com/mathnet/mathnet-numerics -// http://mathnetnumerics.codeplex.com // -// Copyright (c) 2009-2016 Math.NET +// Copyright (c) 2009-2017 Math.NET // // Permission is hereby granted, free of charge, to any person // obtaining a copy of this software and associated documentation @@ -33,7 +32,6 @@ using MathNet.Numerics.LinearAlgebra.Double; using MathNet.Numerics.Optimization; using NUnit.Framework; using System.Linq; -using System.Text; using System.Collections.Generic; using MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions; using System.Collections; diff --git a/src/UnitTests/OptimizationTests/BfgsMinimizerTests.cs b/src/UnitTests/OptimizationTests/BfgsMinimizerTests.cs index bedad77a..4f4b3e22 100644 --- a/src/UnitTests/OptimizationTests/BfgsMinimizerTests.cs +++ b/src/UnitTests/OptimizationTests/BfgsMinimizerTests.cs @@ -1,9 +1,37 @@ -using System; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +using System; using System.Linq; using MathNet.Numerics.LinearAlgebra.Double; using MathNet.Numerics.Optimization; using NUnit.Framework; -using System.Text; using MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions; using System.Collections.Generic; using System.Collections; diff --git a/src/UnitTests/OptimizationTests/BfgsTest.cs b/src/UnitTests/OptimizationTests/BfgsTest.cs index b2c17916..bc489d18 100644 --- a/src/UnitTests/OptimizationTests/BfgsTest.cs +++ b/src/UnitTests/OptimizationTests/BfgsTest.cs @@ -2,9 +2,8 @@ // Math.NET Numerics, part of the Math.NET Project // http://numerics.mathdotnet.com // http://github.com/mathnet/mathnet-numerics -// http://mathnetnumerics.codeplex.com // -// Copyright (c) 2009-2016 Math.NET +// Copyright (c) 2009-2017 Math.NET // // Permission is hereby granted, free of charge, to any person // obtaining a copy of this software and associated documentation @@ -30,6 +29,7 @@ using MathNet.Numerics.LinearAlgebra.Double; using MathNet.Numerics.Optimization; +using MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions; using NUnit.Framework; namespace MathNet.Numerics.UnitTests.OptimizationTests diff --git a/src/UnitTests/OptimizationTests/ConjugateGradientMinimizerTests.cs b/src/UnitTests/OptimizationTests/ConjugateGradientMinimizerTests.cs index 0b05a067..adbcf570 100644 --- a/src/UnitTests/OptimizationTests/ConjugateGradientMinimizerTests.cs +++ b/src/UnitTests/OptimizationTests/ConjugateGradientMinimizerTests.cs @@ -1,4 +1,33 @@ -using System; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +using System; using MathNet.Numerics.LinearAlgebra.Double; using MathNet.Numerics.Optimization; using NUnit.Framework; diff --git a/src/UnitTests/OptimizationTests/GoldenSectionMinimizerTests.cs b/src/UnitTests/OptimizationTests/GoldenSectionMinimizerTests.cs index e04088d9..293940a4 100644 --- a/src/UnitTests/OptimizationTests/GoldenSectionMinimizerTests.cs +++ b/src/UnitTests/OptimizationTests/GoldenSectionMinimizerTests.cs @@ -1,4 +1,33 @@ -using System; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +using System; using MathNet.Numerics.Optimization; using NUnit.Framework; diff --git a/src/UnitTests/OptimizationTests/TestFunctionAdapters.cs b/src/UnitTests/OptimizationTests/MghObjectiveFunction.cs similarity index 55% rename from src/UnitTests/OptimizationTests/TestFunctionAdapters.cs rename to src/UnitTests/OptimizationTests/MghObjectiveFunction.cs index 8b5a43ae..c45d5397 100644 --- a/src/UnitTests/OptimizationTests/TestFunctionAdapters.cs +++ b/src/UnitTests/OptimizationTests/MghObjectiveFunction.cs @@ -1,9 +1,32 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using MathNet.Numerics.LinearAlgebra; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + using MathNet.Numerics.Optimization; using MathNet.Numerics.Optimization.ObjectiveFunctions; using MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions; diff --git a/src/UnitTests/OptimizationTests/NelderMeadSimplexTests.cs b/src/UnitTests/OptimizationTests/NelderMeadSimplexTests.cs index 4473a8df..3d0f0c75 100644 --- a/src/UnitTests/OptimizationTests/NelderMeadSimplexTests.cs +++ b/src/UnitTests/OptimizationTests/NelderMeadSimplexTests.cs @@ -2,9 +2,8 @@ // Math.NET Numerics, part of the Math.NET Project // http://numerics.mathdotnet.com // http://github.com/mathnet/mathnet-numerics -// http://mathnetnumerics.codeplex.com // -// Copyright (c) 2009-2016 Math.NET +// Copyright (c) 2009-2017 Math.NET // // Permission is hereby granted, free of charge, to any person // obtaining a copy of this software and associated documentation diff --git a/src/UnitTests/OptimizationTests/NewtonMinimizerTests.cs b/src/UnitTests/OptimizationTests/NewtonMinimizerTests.cs index 6941f7db..6abb04de 100644 --- a/src/UnitTests/OptimizationTests/NewtonMinimizerTests.cs +++ b/src/UnitTests/OptimizationTests/NewtonMinimizerTests.cs @@ -1,4 +1,33 @@ -using System; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +using System; using MathNet.Numerics.LinearAlgebra.Double; using MathNet.Numerics.Optimization; using MathNet.Numerics.Optimization.ObjectiveFunctions; diff --git a/src/UnitTests/OptimizationTests/RosenbrockFunctionTests.cs b/src/UnitTests/OptimizationTests/RosenbrockFunctionTests.cs index b1b0e5ae..eda8453e 100644 --- a/src/UnitTests/OptimizationTests/RosenbrockFunctionTests.cs +++ b/src/UnitTests/OptimizationTests/RosenbrockFunctionTests.cs @@ -1,5 +1,35 @@ -using System; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +using System; using MathNet.Numerics.LinearAlgebra.Double; +using MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions; using NUnit.Framework; namespace MathNet.Numerics.UnitTests.OptimizationTests diff --git a/src/UnitTests/OptimizationTests/TestCaseDataExtensions.cs b/src/UnitTests/OptimizationTests/TestCaseDataExtensions.cs index 91d2d4ef..251f2458 100644 --- a/src/UnitTests/OptimizationTests/TestCaseDataExtensions.cs +++ b/src/UnitTests/OptimizationTests/TestCaseDataExtensions.cs @@ -1,9 +1,33 @@ -using NUnit.Framework; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +using NUnit.Framework; namespace MathNet.Numerics.UnitTests.OptimizationTests { diff --git a/src/UnitTests/OptimizationTests/TestFunctionTests.cs b/src/UnitTests/OptimizationTests/TestFunctionTests.cs index e3108615..e3cc29a9 100644 --- a/src/UnitTests/OptimizationTests/TestFunctionTests.cs +++ b/src/UnitTests/OptimizationTests/TestFunctionTests.cs @@ -1,8 +1,35 @@ -using System; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +using System; using System.Collections.Generic; using System.Linq; -using System.Text; -using System.Threading.Tasks; using MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions; using NUnit.Framework; using MathNet.Numerics.LinearAlgebra; diff --git a/src/UnitTests/OptimizationTests/TestFunctions/BaseTestFunction.cs b/src/UnitTests/OptimizationTests/TestFunctions/BaseTestFunction.cs index 60da6c61..6c602064 100644 --- a/src/UnitTests/OptimizationTests/TestFunctions/BaseTestFunction.cs +++ b/src/UnitTests/OptimizationTests/TestFunctions/BaseTestFunction.cs @@ -1,8 +1,33 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +using System; using MathNet.Numerics.LinearAlgebra; namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions @@ -23,7 +48,7 @@ namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions this.ItemGradientByRef(x, itemIndex, output); return output; } - + public virtual Matrix ItemHessian(Vector x, int itemIndex) { var output = new LinearAlgebra.Double.DenseMatrix(this.ParameterDimension, this.ParameterDimension); diff --git a/src/UnitTests/OptimizationTests/TestFunctions/BealeFunction.cs b/src/UnitTests/OptimizationTests/TestFunctions/BealeFunction.cs index b55208dd..c3b74b77 100644 --- a/src/UnitTests/OptimizationTests/TestFunctions/BealeFunction.cs +++ b/src/UnitTests/OptimizationTests/TestFunctions/BealeFunction.cs @@ -1,8 +1,34 @@ -using System; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using MathNet.Numerics.LinearAlgebra; namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions diff --git a/src/UnitTests/OptimizationTests/TestFunctions/BrownAndDennisFunction.cs b/src/UnitTests/OptimizationTests/TestFunctions/BrownAndDennisFunction.cs index 9e5b9c41..52db8360 100644 --- a/src/UnitTests/OptimizationTests/TestFunctions/BrownAndDennisFunction.cs +++ b/src/UnitTests/OptimizationTests/TestFunctions/BrownAndDennisFunction.cs @@ -1,8 +1,34 @@ -using System; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using MathNet.Numerics.LinearAlgebra; namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions diff --git a/src/UnitTests/OptimizationTests/TestFunctions/BrownBadlyScaledFunction.cs b/src/UnitTests/OptimizationTests/TestFunctions/BrownBadlyScaledFunction.cs index e0056244..ed970928 100644 --- a/src/UnitTests/OptimizationTests/TestFunctions/BrownBadlyScaledFunction.cs +++ b/src/UnitTests/OptimizationTests/TestFunctions/BrownBadlyScaledFunction.cs @@ -1,8 +1,34 @@ -using System; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using MathNet.Numerics.LinearAlgebra; namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions diff --git a/src/UnitTests/OptimizationTests/TestFunctions/FreudensteinAndRothFunction.cs b/src/UnitTests/OptimizationTests/TestFunctions/FreudensteinAndRothFunction.cs index 16cbe4c2..812d6c95 100644 --- a/src/UnitTests/OptimizationTests/TestFunctions/FreudensteinAndRothFunction.cs +++ b/src/UnitTests/OptimizationTests/TestFunctions/FreudensteinAndRothFunction.cs @@ -1,11 +1,34 @@ -using System; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using MathNet.Numerics.LinearAlgebra; -using DenseVector = MathNet.Numerics.LinearAlgebra.Double.DenseVector; -using DenseMatrix = MathNet.Numerics.LinearAlgebra.Double.DenseMatrix; namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions { diff --git a/src/UnitTests/OptimizationTests/TestFunctions/HelicalValleyFunction.cs b/src/UnitTests/OptimizationTests/TestFunctions/HelicalValleyFunction.cs index 987eb7fe..19f41eb3 100644 --- a/src/UnitTests/OptimizationTests/TestFunctions/HelicalValleyFunction.cs +++ b/src/UnitTests/OptimizationTests/TestFunctions/HelicalValleyFunction.cs @@ -1,8 +1,34 @@ -using System; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using MathNet.Numerics.LinearAlgebra; namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions diff --git a/src/UnitTests/OptimizationTests/TestFunctions/ITestFunction.cs b/src/UnitTests/OptimizationTests/TestFunctions/ITestFunction.cs index 563faec2..f62ac99d 100644 --- a/src/UnitTests/OptimizationTests/TestFunctions/ITestFunction.cs +++ b/src/UnitTests/OptimizationTests/TestFunctions/ITestFunction.cs @@ -1,10 +1,34 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + using MathNet.Numerics.LinearAlgebra; -using DenseVector = MathNet.Numerics.LinearAlgebra.Double.DenseVector; +using MathNet.Numerics.LinearAlgebra.Double; namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions { diff --git a/src/UnitTests/OptimizationTests/TestFunctions/JennrichAndSampsonFunction.cs b/src/UnitTests/OptimizationTests/TestFunctions/JennrichAndSampsonFunction.cs index 58cc30eb..846f04c9 100644 --- a/src/UnitTests/OptimizationTests/TestFunctions/JennrichAndSampsonFunction.cs +++ b/src/UnitTests/OptimizationTests/TestFunctions/JennrichAndSampsonFunction.cs @@ -1,8 +1,34 @@ -using System; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using MathNet.Numerics.LinearAlgebra; namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions diff --git a/src/UnitTests/OptimizationTests/TestFunctions/MeyerFunction.cs b/src/UnitTests/OptimizationTests/TestFunctions/MeyerFunction.cs index 961da226..f4af8826 100644 --- a/src/UnitTests/OptimizationTests/TestFunctions/MeyerFunction.cs +++ b/src/UnitTests/OptimizationTests/TestFunctions/MeyerFunction.cs @@ -1,8 +1,34 @@ -using System; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using MathNet.Numerics.LinearAlgebra; namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions diff --git a/src/UnitTests/OptimizationTests/TestFunctions/PowellBadlyScaledFunction.cs b/src/UnitTests/OptimizationTests/TestFunctions/PowellBadlyScaledFunction.cs index 8885a39d..8709a93d 100644 --- a/src/UnitTests/OptimizationTests/TestFunctions/PowellBadlyScaledFunction.cs +++ b/src/UnitTests/OptimizationTests/TestFunctions/PowellBadlyScaledFunction.cs @@ -1,10 +1,35 @@ -using System; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using MathNet.Numerics.LinearAlgebra; -using MathNet.Numerics.LinearAlgebra.Double; namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions { diff --git a/src/UnitTests/OptimizationTests/TestFunctions/PowellSingularFunction.cs b/src/UnitTests/OptimizationTests/TestFunctions/PowellSingularFunction.cs index 130b057a..38f9fe92 100644 --- a/src/UnitTests/OptimizationTests/TestFunctions/PowellSingularFunction.cs +++ b/src/UnitTests/OptimizationTests/TestFunctions/PowellSingularFunction.cs @@ -1,8 +1,34 @@ -using System; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using MathNet.Numerics.LinearAlgebra; namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions diff --git a/src/UnitTests/OptimizationTests/RosenbrockFunction.cs b/src/UnitTests/OptimizationTests/TestFunctions/RosenbrockFunction.cs similarity index 57% rename from src/UnitTests/OptimizationTests/RosenbrockFunction.cs rename to src/UnitTests/OptimizationTests/TestFunctions/RosenbrockFunction.cs index 56a43f8d..9224d10a 100644 --- a/src/UnitTests/OptimizationTests/RosenbrockFunction.cs +++ b/src/UnitTests/OptimizationTests/TestFunctions/RosenbrockFunction.cs @@ -1,8 +1,37 @@ -using System; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +using System; using MathNet.Numerics.LinearAlgebra; using MathNet.Numerics.LinearAlgebra.Double; -namespace MathNet.Numerics.UnitTests.OptimizationTests +namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions { public static class RosenbrockFunction { diff --git a/src/UnitTests/OptimizationTests/TestFunctions/RosenbrockFunction2.cs b/src/UnitTests/OptimizationTests/TestFunctions/RosenbrockFunction2.cs index c693b507..a8be17d6 100644 --- a/src/UnitTests/OptimizationTests/TestFunctions/RosenbrockFunction2.cs +++ b/src/UnitTests/OptimizationTests/TestFunctions/RosenbrockFunction2.cs @@ -1,8 +1,33 @@ -using System; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using MathNet.Numerics.LinearAlgebra; namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions diff --git a/src/UnitTests/OptimizationTests/TestFunctions/WoodFunction.cs b/src/UnitTests/OptimizationTests/TestFunctions/WoodFunction.cs index 4e8f014e..231ce6a7 100644 --- a/src/UnitTests/OptimizationTests/TestFunctions/WoodFunction.cs +++ b/src/UnitTests/OptimizationTests/TestFunctions/WoodFunction.cs @@ -1,8 +1,34 @@ -using System; +// +// Math.NET Numerics, part of the Math.NET Project +// http://numerics.mathdotnet.com +// http://github.com/mathnet/mathnet-numerics +// +// Copyright (c) 2009-2017 Math.NET +// +// Permission is hereby granted, free of charge, to any person +// obtaining a copy of this software and associated documentation +// files (the "Software"), to deal in the Software without +// restriction, including without limitation the rights to use, +// copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the +// Software is furnished to do so, subject to the following +// conditions: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +// OTHER DEALINGS IN THE SOFTWARE. +// + +using System; using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using MathNet.Numerics.LinearAlgebra; namespace MathNet.Numerics.UnitTests.OptimizationTests.TestFunctions diff --git a/src/UnitTests/UnitTests.csproj b/src/UnitTests/UnitTests.csproj index 0adfb703..da1796ad 100644 --- a/src/UnitTests/UnitTests.csproj +++ b/src/UnitTests/UnitTests.csproj @@ -368,7 +368,7 @@ - + @@ -385,7 +385,7 @@ - + @@ -501,4 +501,4 @@ - + \ No newline at end of file