From cf1e6ab27aa49561123485865ed006eb47c87d0b Mon Sep 17 00:00:00 2001 From: Christoph Ruegg Date: Thu, 2 Jul 2009 06:26:18 +0800 Subject: [PATCH] interpolation: minor code formatting Signed-off-by: Christoph Ruegg --- .../Algorithms/BarycentricInterpolation.cs | 8 ++------ .../Algorithms/LinearSplineInterpolation.cs | 11 +++-------- .../Algorithms/RationalPoleFreeInterpolation.cs | 15 ++++----------- .../Algorithms/SplineInterpolation.cs | 8 ++------ 4 files changed, 11 insertions(+), 31 deletions(-) diff --git a/src/Managed/Interpolation/Algorithms/BarycentricInterpolation.cs b/src/Managed/Interpolation/Algorithms/BarycentricInterpolation.cs index 43c9a770..dfe46197 100644 --- a/src/Managed/Interpolation/Algorithms/BarycentricInterpolation.cs +++ b/src/Managed/Interpolation/Algorithms/BarycentricInterpolation.cs @@ -79,9 +79,7 @@ namespace MathNet.Numerics.Interpolation.Algorithms /// Sample Points t /// Sample Values x(t) /// Barycentric weights w(t) - public - void - Initialize( + public void Initialize( IList samplePoints, IList sampleValues, IList barycentricWeights) @@ -126,9 +124,7 @@ namespace MathNet.Numerics.Interpolation.Algorithms /// /// Point t to interpolate at. /// Interpolated value x(t). - public - double - Interpolate(double t) + public double Interpolate(double t) { // trivial case: only one sample? if (this.points.Count == 1) diff --git a/src/Managed/Interpolation/Algorithms/LinearSplineInterpolation.cs b/src/Managed/Interpolation/Algorithms/LinearSplineInterpolation.cs index ac1b7f9d..3843f6d5 100644 --- a/src/Managed/Interpolation/Algorithms/LinearSplineInterpolation.cs +++ b/src/Managed/Interpolation/Algorithms/LinearSplineInterpolation.cs @@ -47,8 +47,7 @@ namespace MathNet.Numerics.Interpolation.Algorithms /// /// Initializes a new instance of the LinearSplineInterpolation class. /// - public - LinearSplineInterpolation() + public LinearSplineInterpolation() { this.spline = new SplineInterpolation(); } @@ -77,9 +76,7 @@ namespace MathNet.Numerics.Interpolation.Algorithms /// /// Sample Points t /// Sample Values x(samplePoints) - public - void - Initialize( + public void Initialize( IList samplePoints, IList sampleValues) { @@ -127,9 +124,7 @@ namespace MathNet.Numerics.Interpolation.Algorithms /// /// Point t to interpolate at. /// Interpolated value x(t). - public - double - Interpolate(double t) + public double Interpolate(double t) { return this.spline.Interpolate(t); } diff --git a/src/Managed/Interpolation/Algorithms/RationalPoleFreeInterpolation.cs b/src/Managed/Interpolation/Algorithms/RationalPoleFreeInterpolation.cs index 6892dfd5..8646afbc 100644 --- a/src/Managed/Interpolation/Algorithms/RationalPoleFreeInterpolation.cs +++ b/src/Managed/Interpolation/Algorithms/RationalPoleFreeInterpolation.cs @@ -47,8 +47,7 @@ namespace MathNet.Numerics.Interpolation.Algorithms /// /// Initializes a new instance of the RationalPoleFreeInterpolation class. /// - public - RationalPoleFreeInterpolation() + public RationalPoleFreeInterpolation() { this.barycentric = new BarycentricInterpolation(); } @@ -80,9 +79,7 @@ namespace MathNet.Numerics.Interpolation.Algorithms /// /// Sample Points t /// Sample Values x(t) - public - void - Initialize( + public void Initialize( IList samplePoints, IList sampleValues) { @@ -98,9 +95,7 @@ namespace MathNet.Numerics.Interpolation.Algorithms /// Order of the interpolation scheme, 0 <= order <= N. /// In most cases a value between 3 and 8 gives good results. /// - public - void - Initialize( + public void Initialize( IList samplePoints, IList sampleValues, int order) @@ -198,9 +193,7 @@ namespace MathNet.Numerics.Interpolation.Algorithms /// /// Point t to interpolate at. /// Interpolated value x(t). - public - double - Interpolate(double t) + public double Interpolate(double t) { return this.barycentric.Interpolate(t); } diff --git a/src/Managed/Interpolation/Algorithms/SplineInterpolation.cs b/src/Managed/Interpolation/Algorithms/SplineInterpolation.cs index dfbb87af..b11d83e8 100644 --- a/src/Managed/Interpolation/Algorithms/SplineInterpolation.cs +++ b/src/Managed/Interpolation/Algorithms/SplineInterpolation.cs @@ -78,9 +78,7 @@ namespace MathNet.Numerics.Interpolation.Algorithms /// /// Sample Points t (length: N) /// Spline Coefficients (length: 4*(N-1)) - public - void - Initialize( + public void Initialize( IList samplePoints, IList splineCoefficients) { @@ -114,9 +112,7 @@ namespace MathNet.Numerics.Interpolation.Algorithms /// /// Point t to interpolate at. /// Interpolated value x(t). - public - double - Interpolate(double t) + public double Interpolate(double t) { // Binary search in the [ t[0], ..., t[n-2] ] (t[n-1] is not included) int low = 0;