diff --git a/src/Managed/Interpolation/IInterpolation.cs b/src/Managed/Interpolation/IInterpolation.cs new file mode 100644 index 00000000..a4fa6b24 --- /dev/null +++ b/src/Managed/Interpolation/IInterpolation.cs @@ -0,0 +1,87 @@ +// +// Math.NET Numerics, part of the Math.NET Project +// http://mathnet.opensourcedotnet.info +// +// Copyright (c) 2009 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. +// + +namespace MathNet.Numerics.Interpolation +{ + /// + /// Interpolation within the range of a discrete set of known data points. + /// + public interface IInterpolation + { + /// + /// Gets a value indicating whether the algorithm supports differentiation (interpolated derivative). + /// + /// + /// + bool SupportsDifferentiation { get; } + + /// + /// Gets a value indicating whether the algorithm supports integration (interpolated quadrature). + /// + /// + bool SupportsIntegration { get; } + + /// + /// Interpolate at point t. + /// + /// Point t to interpolate at. + /// Interpolated value x(t). + double Interpolate(double t); + + /// + /// Differentiate at point t. + /// + /// Point t to interpolate at. + /// Interpolated first derivative at point t. + /// + /// + double Differentiate(double t); + + /// + /// Differentiate at point t. + /// + /// Point t to interpolate at. + /// Interpolated value x(t) + /// Interpolated second derivative at point t. + /// Interpolated first derivative at point t. + /// + /// + double Differentiate( + double t, + out double interpolatedValue, + out double secondDerivative); + + /// + /// Integrate up to point t. + /// + /// Right bound of the integration interval [a,t]. + /// Interpolated definite integral over the interval [a,t]. + /// + double Integrate(double t); + } +} diff --git a/src/Managed/Interpolation/Interpolation.cs b/src/Managed/Interpolation/Interpolation.cs new file mode 100644 index 00000000..e57bcee1 --- /dev/null +++ b/src/Managed/Interpolation/Interpolation.cs @@ -0,0 +1,90 @@ +// +// Math.NET Numerics, part of the Math.NET Project +// http://mathnet.opensourcedotnet.info +// +// Copyright (c) 2009 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. +// + +namespace MathNet.Numerics.Interpolation +{ + using System; + using System.Collections.Generic; + + /// + /// Interpolation Factory. + /// + public static class Interpolation + { + /// + /// Create a rational pole-free interpolation based on arbitrary points. This is the default interpolation scheme. + /// + /// The sample points t. Supports both lists and arrays. + /// The sample point values x(t). Supports both lists and arrays. + /// + /// An interpolation scheme optimized for the given sample points and values, + /// which can then be used to compute interpolations and extrapolations + /// on arbitrary points. + /// + public static IInterpolation Create( + IList points, + IList values) + { + throw new NotImplementedException(); + } + + /// + /// Create a linear spline interpolation based on arbitrary points. + /// + /// The sample points t. Supports both lists and arrays. + /// The sample point values x(t). Supports both lists and arrays. + /// + /// An interpolation scheme optimized for the given sample points and values, + /// which can then be used to compute interpolations and extrapolations + /// on arbitrary points. + /// + public static IInterpolation CreateLinearSpline( + IList points, + IList values) + { + throw new NotImplementedException(); + } + + /// + /// Create a rational pole-free interpolation based on arbitrary points. + /// + /// The sample points t. Supports both lists and arrays. + /// The sample point values x(t). Supports both lists and arrays. + /// + /// An interpolation scheme optimized for the given sample points and values, + /// which can then be used to compute interpolations and extrapolations + /// on arbitrary points. + /// + public static IInterpolation CreateRationalPoleFree( + IList points, + IList values) + { + throw new NotImplementedException(); + } + } +} diff --git a/src/Managed/Managed.csproj b/src/Managed/Managed.csproj index c30cf220..8e7e7de3 100644 --- a/src/Managed/Managed.csproj +++ b/src/Managed/Managed.csproj @@ -54,6 +54,8 @@ + + diff --git a/src/Native/Native.csproj b/src/Native/Native.csproj index d93a1743..31e1919c 100644 --- a/src/Native/Native.csproj +++ b/src/Native/Native.csproj @@ -71,9 +71,15 @@ Distributions\IDistribution.cs + + Interpolation\IInterpolation.cs + + + Interpolation\Interpolation.cs + Precision.cs - + Properties\Resources.Designer.cs