Browse Source

interpolation: renaming some methods and classes

Signed-off-by: Christoph Ruegg <git@cdrnet.ch>
pull/36/head
Christoph Ruegg 17 years ago
parent
commit
55cce660e2
  1. 6
      src/Managed.UnitTests/InterpolationTests/InterpolationTest.cs
  2. 12
      src/Managed/Interpolation/Algorithms/FloaterHormannRationalInterpolation.cs
  3. 16
      src/Managed/Interpolation/Interpolate.cs
  4. 4
      src/Managed/Managed.csproj
  5. 10
      src/Native/Native.csproj

6
src/Managed.UnitTests/InterpolationTests/InterpolationTest.cs

@ -40,16 +40,16 @@ namespace MathNet.Numerics.UnitTests.InterpolationTests
[VerifyContract] [VerifyContract]
public readonly IContract LinearSplineContractTests = new InterpolationContract<LinearSplineInterpolation>() public readonly IContract LinearSplineContractTests = new InterpolationContract<LinearSplineInterpolation>()
{ {
Factory = Interpolation.CreateLinearBetweenPoints, Factory = Interpolate.LinearBetweenPoints,
Order = new[] { 2, 3, 6 }, Order = new[] { 2, 3, 6 },
PolynomialBehavior = false, PolynomialBehavior = false,
RationalBehavior = false RationalBehavior = false
}; };
[VerifyContract] [VerifyContract]
public readonly IContract RationalPoleFreeContractTests = new InterpolationContract<RationalPoleFreeInterpolation>() public readonly IContract FloaterHormannRationalContractTests = new InterpolationContract<FloaterHormannRationalInterpolation>()
{ {
Factory = Interpolation.CreateRationalPoleFree, Factory = Interpolate.RationalWithoutPoles,
Order = new[] { 1, 2, 6 }, Order = new[] { 1, 2, 6 },
PolynomialBehavior = true, PolynomialBehavior = true,
RationalBehavior = true RationalBehavior = true

12
src/Managed/Interpolation/Algorithms/RationalPoleFreeInterpolation.cs → src/Managed/Interpolation/Algorithms/FloaterHormannRationalInterpolation.cs

@ -1,4 +1,4 @@
// <copyright file="RationalPoleFreeInterpolation.cs" company="Math.NET"> // <copyright file="FloaterHormannRationalInterpolation.cs" company="Math.NET">
// Math.NET Numerics, part of the Math.NET Project // Math.NET Numerics, part of the Math.NET Project
// http://mathnet.opensourcedotnet.info // http://mathnet.opensourcedotnet.info
// //
@ -37,7 +37,7 @@ namespace MathNet.Numerics.Interpolation.Algorithms
/// <remarks> /// <remarks>
/// This algorithm neither supports differentiation nor integration. /// This algorithm neither supports differentiation nor integration.
/// </remarks> /// </remarks>
public class RationalPoleFreeInterpolation : IInterpolation public class FloaterHormannRationalInterpolation : IInterpolation
{ {
/// <summary> /// <summary>
/// Internal Barycentric Interpolation /// Internal Barycentric Interpolation
@ -45,19 +45,19 @@ namespace MathNet.Numerics.Interpolation.Algorithms
private readonly BarycentricInterpolation _barycentric; private readonly BarycentricInterpolation _barycentric;
/// <summary> /// <summary>
/// Initializes a new instance of the RationalPoleFreeInterpolation class. /// Initializes a new instance of the FloaterHormannRationalInterpolation class.
/// </summary> /// </summary>
public RationalPoleFreeInterpolation() public FloaterHormannRationalInterpolation()
{ {
_barycentric = new BarycentricInterpolation(); _barycentric = new BarycentricInterpolation();
} }
/// <summary> /// <summary>
/// Initializes a new instance of the RationalPoleFreeInterpolation class. /// Initializes a new instance of the FloaterHormannRationalInterpolation class.
/// </summary> /// </summary>
/// <param name="samplePoints">Sample Points t</param> /// <param name="samplePoints">Sample Points t</param>
/// <param name="sampleValues">Sample Values x(t)</param> /// <param name="sampleValues">Sample Values x(t)</param>
public RationalPoleFreeInterpolation( public FloaterHormannRationalInterpolation(
IList<double> samplePoints, IList<double> samplePoints,
IList<double> sampleValues) IList<double> sampleValues)
{ {

16
src/Managed/Interpolation/Interpolation.cs → src/Managed/Interpolation/Interpolate.cs

@ -1,4 +1,4 @@
// <copyright file="Interpolation.cs" company="Math.NET"> // <copyright file="Interpolate.cs" company="Math.NET">
// Math.NET Numerics, part of the Math.NET Project // Math.NET Numerics, part of the Math.NET Project
// http://mathnet.opensourcedotnet.info // http://mathnet.opensourcedotnet.info
// //
@ -34,7 +34,7 @@ namespace MathNet.Numerics.Interpolation
/// <summary> /// <summary>
/// Interpolation Factory. /// Interpolation Factory.
/// </summary> /// </summary>
public static class Interpolation public static class Interpolate
{ {
/// <summary> /// <summary>
/// Creates an interpolation based on arbitrary points. /// Creates an interpolation based on arbitrary points.
@ -46,11 +46,11 @@ namespace MathNet.Numerics.Interpolation
/// which can then be used to compute interpolations and extrapolations /// which can then be used to compute interpolations and extrapolations
/// on arbitrary points. /// on arbitrary points.
/// </returns> /// </returns>
public static IInterpolation Create( public static IInterpolation Common(
IList<double> points, IList<double> points,
IList<double> values) IList<double> values)
{ {
return CreateRationalPoleFree(points, values); return RationalWithoutPoles(points, values);
} }
/// <summary> /// <summary>
@ -63,7 +63,7 @@ namespace MathNet.Numerics.Interpolation
/// which can then be used to compute interpolations and extrapolations /// which can then be used to compute interpolations and extrapolations
/// on arbitrary points. /// on arbitrary points.
/// </returns> /// </returns>
public static IInterpolation CreateLinearBetweenPoints( public static IInterpolation LinearBetweenPoints(
IList<double> points, IList<double> points,
IList<double> values) IList<double> values)
{ {
@ -73,7 +73,7 @@ namespace MathNet.Numerics.Interpolation
} }
/// <summary> /// <summary>
/// Create a rational pole-free interpolation based on arbitrary points. /// Create a floater hormann rational pole-free interpolation based on arbitrary points.
/// </summary> /// </summary>
/// <param name="points">The sample points t. Supports both lists and arrays.</param> /// <param name="points">The sample points t. Supports both lists and arrays.</param>
/// <param name="values">The sample point values x(t). Supports both lists and arrays.</param> /// <param name="values">The sample point values x(t). Supports both lists and arrays.</param>
@ -82,11 +82,11 @@ namespace MathNet.Numerics.Interpolation
/// which can then be used to compute interpolations and extrapolations /// which can then be used to compute interpolations and extrapolations
/// on arbitrary points. /// on arbitrary points.
/// </returns> /// </returns>
public static IInterpolation CreateRationalPoleFree( public static IInterpolation RationalWithoutPoles(
IList<double> points, IList<double> points,
IList<double> values) IList<double> values)
{ {
RationalPoleFreeInterpolation method = new RationalPoleFreeInterpolation(); FloaterHormannRationalInterpolation method = new FloaterHormannRationalInterpolation();
method.Initialize(points, values); method.Initialize(points, values);
return method; return method;
} }

4
src/Managed/Managed.csproj

@ -55,12 +55,12 @@
<Compile Include="Distributions\IDiscreteDistribution.cs" /> <Compile Include="Distributions\IDiscreteDistribution.cs" />
<Compile Include="Distributions\IDistribution.cs" /> <Compile Include="Distributions\IDistribution.cs" />
<Compile Include="Interpolation\Algorithms\BarycentricInterpolation.cs" /> <Compile Include="Interpolation\Algorithms\BarycentricInterpolation.cs" />
<Compile Include="Interpolation\Algorithms\FloaterHormannRationalInterpolation.cs" />
<Compile Include="Interpolation\Algorithms\LinearSplineInterpolation.cs" /> <Compile Include="Interpolation\Algorithms\LinearSplineInterpolation.cs" />
<Compile Include="Interpolation\Algorithms\NevillePolynomialInterpolation.cs" /> <Compile Include="Interpolation\Algorithms\NevillePolynomialInterpolation.cs" />
<Compile Include="Interpolation\Algorithms\RationalPoleFreeInterpolation.cs" />
<Compile Include="Interpolation\Algorithms\SplineInterpolation.cs" /> <Compile Include="Interpolation\Algorithms\SplineInterpolation.cs" />
<Compile Include="Interpolation\IInterpolation.cs" /> <Compile Include="Interpolation\IInterpolation.cs" />
<Compile Include="Interpolation\Interpolation.cs" /> <Compile Include="Interpolation\Interpolate.cs" />
<Compile Include="Precision.cs" /> <Compile Include="Precision.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs"> <Compile Include="Properties\Resources.Designer.cs">

10
src/Native/Native.csproj

@ -74,23 +74,23 @@
<Compile Include="..\Managed\Interpolation\Algorithms\BarycentricInterpolation.cs"> <Compile Include="..\Managed\Interpolation\Algorithms\BarycentricInterpolation.cs">
<Link>Interpolation\Algorithms\BarycentricInterpolation.cs</Link> <Link>Interpolation\Algorithms\BarycentricInterpolation.cs</Link>
</Compile> </Compile>
<Compile Include="..\Managed\Interpolation\Algorithms\FloaterHormannRationalInterpolation.cs">
<Link>Interpolation\Algorithms\FloaterHormannRationalInterpolation.cs</Link>
</Compile>
<Compile Include="..\Managed\Interpolation\Algorithms\LinearSplineInterpolation.cs"> <Compile Include="..\Managed\Interpolation\Algorithms\LinearSplineInterpolation.cs">
<Link>Interpolation\Algorithms\LinearSplineInterpolation.cs</Link> <Link>Interpolation\Algorithms\LinearSplineInterpolation.cs</Link>
</Compile> </Compile>
<Compile Include="..\Managed\Interpolation\Algorithms\NevillePolynomialInterpolation.cs"> <Compile Include="..\Managed\Interpolation\Algorithms\NevillePolynomialInterpolation.cs">
<Link>Interpolation\Algorithms\NevillePolynomialInterpolation.cs</Link> <Link>Interpolation\Algorithms\NevillePolynomialInterpolation.cs</Link>
</Compile> </Compile>
<Compile Include="..\Managed\Interpolation\Algorithms\RationalPoleFreeInterpolation.cs">
<Link>Interpolation\Algorithms\RationalPoleFreeInterpolation.cs</Link>
</Compile>
<Compile Include="..\Managed\Interpolation\Algorithms\SplineInterpolation.cs"> <Compile Include="..\Managed\Interpolation\Algorithms\SplineInterpolation.cs">
<Link>Interpolation\Algorithms\SplineInterpolation.cs</Link> <Link>Interpolation\Algorithms\SplineInterpolation.cs</Link>
</Compile> </Compile>
<Compile Include="..\Managed\Interpolation\IInterpolation.cs"> <Compile Include="..\Managed\Interpolation\IInterpolation.cs">
<Link>Interpolation\IInterpolation.cs</Link> <Link>Interpolation\IInterpolation.cs</Link>
</Compile> </Compile>
<Compile Include="..\Managed\Interpolation\Interpolation.cs"> <Compile Include="..\Managed\Interpolation\Interpolate.cs">
<Link>Interpolation\Interpolation.cs</Link> <Link>Interpolation\Interpolate.cs</Link>
</Compile> </Compile>
<Compile Include="..\Managed\Precision.cs"> <Compile Include="..\Managed\Precision.cs">
<Link>Precision.cs</Link> <Link>Precision.cs</Link>

Loading…
Cancel
Save