From 72b86504fec963940769f2338ab30cafd8f38a12 Mon Sep 17 00:00:00 2001 From: Christoph Ruegg Date: Sat, 4 May 2013 14:01:24 +0200 Subject: [PATCH] RootFinding: s/FloatingPointRoots/RealRoots/ --- src/Numerics/Numerics.csproj | 2 +- .../RootFinding/{FloatingPointRoots.cs => RealRoots.cs} | 2 +- src/Portable/Portable.csproj | 4 ++-- src/UnitTests/RootFindingTests/NewtonRaphsonTest.cs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) rename src/Numerics/RootFinding/{FloatingPointRoots.cs => RealRoots.cs} (98%) diff --git a/src/Numerics/Numerics.csproj b/src/Numerics/Numerics.csproj index ca3e50a5..e0478543 100644 --- a/src/Numerics/Numerics.csproj +++ b/src/Numerics/Numerics.csproj @@ -114,7 +114,7 @@ - + diff --git a/src/Numerics/RootFinding/FloatingPointRoots.cs b/src/Numerics/RootFinding/RealRoots.cs similarity index 98% rename from src/Numerics/RootFinding/FloatingPointRoots.cs rename to src/Numerics/RootFinding/RealRoots.cs index 79324a31..c9eb0b5e 100644 --- a/src/Numerics/RootFinding/FloatingPointRoots.cs +++ b/src/Numerics/RootFinding/RealRoots.cs @@ -33,7 +33,7 @@ using MathNet.Numerics.RootFinding.Algorithms; namespace MathNet.Numerics.RootFinding { - public static class FloatingPointRoots + public static class RealRoots { public static double OfFunction(Func f, double lowerBound, double upperBound, double accuracy = 1e-8) { diff --git a/src/Portable/Portable.csproj b/src/Portable/Portable.csproj index 7adc1441..df66b7d6 100644 --- a/src/Portable/Portable.csproj +++ b/src/Portable/Portable.csproj @@ -999,8 +999,8 @@ RootFinding\Bracketing.cs - - RootFinding\FloatingPointRoots.cs + + RootFinding\RealRoots.cs SerializableAttribute.cs diff --git a/src/UnitTests/RootFindingTests/NewtonRaphsonTest.cs b/src/UnitTests/RootFindingTests/NewtonRaphsonTest.cs index a045842e..2d32f75d 100644 --- a/src/UnitTests/RootFindingTests/NewtonRaphsonTest.cs +++ b/src/UnitTests/RootFindingTests/NewtonRaphsonTest.cs @@ -77,13 +77,13 @@ namespace MathNet.Numerics.UnitTests.RootFindingTests Func df1 = x => -1/(x*x - 4*x + 4); Assert.AreEqual(1.5, HybridNewtonRaphson.FindRoot(f1, df1, 1, 2, 1e-14, 100, 20)); Assert.AreEqual(1.5, HybridNewtonRaphson.FindRoot(f1, df1, 1, 6, 1e-14, 100, 20)); - Assert.AreEqual(1.5, FloatingPointRoots.OfFunctionAndDerivative(f1, df1, 1, 6)); + Assert.AreEqual(1.5, RealRoots.OfFunctionAndDerivative(f1, df1, 1, 6)); Func f2 = x => -1/(x - 2) + 2; Func df2 = x => 1/(x*x - 4*x + 4); Assert.AreEqual(2.5, HybridNewtonRaphson.FindRoot(f2, df2, 2, 3, 1e-14, 100, 20)); Assert.AreEqual(2.5, HybridNewtonRaphson.FindRoot(f2, df2, -2, 3, 1e-14, 100, 20)); - Assert.AreEqual(2.5, FloatingPointRoots.OfFunctionAndDerivative(f2, df2, -2, 3)); + Assert.AreEqual(2.5, RealRoots.OfFunctionAndDerivative(f2, df2, -2, 3)); Func f3 = x => 1/(x - 2) + x + 2; Func df3 = x => -1/(x*x - 4*x + 4) + 1;