Extreme Optimization™: Complexity made simple.

Math and Statistics
Libraries for .NET

  • Home
  • Features
    • Math Library
    • Vector and Matrix Library
    • Statistics Library
    • Performance
    • Usability
  • Documentation
    • Introduction
    • Math Library User's Guide
    • Vector and Matrix Library User's Guide
    • Data Analysis Library User's Guide
    • Statistics Library User's Guide
    • Reference
  • Resources
    • Downloads
    • QuickStart Samples
    • Sample Applications
    • Frequently Asked Questions
    • Technical Support
  • Blog
  • Order
  • Company
    • About us
    • Testimonials
    • Customers
    • Press Releases
    • Careers
    • Partners
    • Contact us
Introduction
Deployment Guide
Nuget packages
Configuration
Using Parallelism
Expand Mathematics Library User's GuideMathematics Library User's Guide
Expand Vector and Matrix Library User's GuideVector and Matrix Library User's Guide
Expand Data Analysis Library User's GuideData Analysis Library User's Guide
Expand Statistics Library User's GuideStatistics Library User's Guide
Expand Data Access Library User's GuideData Access Library User's Guide
Expand ReferenceReference
  • Extreme Optimization
    • Features
    • Solutions
    • Documentation
    • QuickStart Samples
    • Sample Applications
    • Downloads
    • Technical Support
    • Download trial
    • How to buy
    • Blog
    • Company
    • Resources
  • Documentation
    • Introduction
    • Deployment Guide
    • Nuget packages
    • Configuration
    • Using Parallelism
    • Mathematics Library User's Guide
    • Vector and Matrix Library User's Guide
    • Data Analysis Library User's Guide
    • Statistics Library User's Guide
    • Data Access Library User's Guide
    • Reference
  • Reference
    • Extreme
    • Extreme.Collections
    • Extreme.Data
    • Extreme.Data.Json
    • Extreme.Data.Matlab
    • Extreme.Data.R
    • Extreme.Data.Stata
    • Extreme.Data.Text
    • Extreme.DataAnalysis
    • Extreme.DataAnalysis.Linq
    • Extreme.DataAnalysis.Models
    • Extreme.Mathematics
    • Extreme.Mathematics.Algorithms
    • Extreme.Mathematics.Calculus
    • Extreme.Mathematics.Calculus.OrdinaryDifferentialEquations
    • Extreme.Mathematics.Curves
    • Extreme.Mathematics.Curves.Nonlinear
    • Extreme.Mathematics.Distributed
    • Extreme.Mathematics.EquationSolvers
    • Extreme.Mathematics.Generic
    • Extreme.Mathematics.LinearAlgebra
    • Extreme.Mathematics.LinearAlgebra.Implementation
    • Extreme.Mathematics.LinearAlgebra.IterativeSolvers
    • Extreme.Mathematics.LinearAlgebra.IterativeSolvers.Preconditioners
    • Extreme.Mathematics.Optimization
    • Extreme.Mathematics.Optimization.LineSearches
    • Extreme.Mathematics.Random
    • Extreme.Mathematics.SignalProcessing
    • Extreme.Providers
    • Extreme.Providers.InteropServices
    • Extreme.Statistics
    • Extreme.Statistics.Distributions
    • Extreme.Statistics.Multivariate
    • Extreme.Statistics.Tests
    • Extreme.Statistics.TimeSeriesAnalysis
  • Extreme.Mathematics.Curves
    • BarycentricBasis Class
    • BarycentricSeries Class
    • ChebyshevBasis Class
    • ChebyshevSeries Class
    • CubicSpline Class
    • CubicSplineKind Enumeration
    • Curve Class
    • CurveFitter Class
    • FunctionBasis Class
    • GeneralCurve Class
    • GeneralFunctionBasis Class
    • LinearCombination Class
    • LinearCurveFitter Class
    • LinearLeastSquaresMethod Enumeration
    • NonlinearCurve Class
    • NonlinearCurveFitter Class
    • NonlinearCurveFitter(T) Class
    • NonlinearCurveFittingMethod Enumeration
    • PiecewiseConstantCurve Class
    • PiecewiseCurve Class
    • PiecewiseLinearCurve Class
    • Point Structure
    • Polynomial Class
    • PolynomialBase Class
    • PolynomialBasis Class
    • WeightFunctions Class
  • CubicSpline Class
    • CubicSpline Constructors
    • Properties
    • Methods

CubicSpline Class

Extreme Optimization Numerical Libraries for .NET Professional
Represents a cubic spline curve.
Inheritance Hierarchy

SystemObject
  Extreme.Mathematics.CurvesCurve
    Extreme.Mathematics.CurvesPiecewiseCurve
      Extreme.Mathematics.CurvesCubicSpline

Namespace:  Extreme.Mathematics.Curves
Assembly:  Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.1
Syntax

C#
VB
C++
F#
Copy
public class CubicSpline : PiecewiseCurve
Public Class CubicSpline
	Inherits PiecewiseCurve
public ref class CubicSpline : public PiecewiseCurve
type CubicSpline =  
    class
        inherit PiecewiseCurve
    end

The CubicSpline type exposes the following members.

Constructors

  NameDescription
Public methodCubicSpline(IListPoint)
Constructs the natural cubic spline through a set of points.
Public methodCubicSpline(Double, Double)
Constructs the natural cubic spline through a set of points.
Public methodCubicSpline(IListPoint, CubicSplineKind)
Constructs the natural cubic spline through a set of points.
Public methodCubicSpline(IListPoint, IListDouble)
Constructs the cubic Hermite spline through a set of points.
Public methodCubicSpline(IListDouble, IListDouble)
Constructs the natural cubic spline through a set of points.
Public methodCubicSpline(Double, Double, CubicSplineKind)
Constructs a natural or Akima cubic spline through a set of points.
Public methodCubicSpline(Double, Double, Double)
Constructs the cubic Hermite spline through a set of points.
Public methodCubicSpline(IListPoint, Double, IListDouble)
Constructs a cubic smoothing spline with the specified smoothing parameter.
Public methodCubicSpline(IListPoint, Double, Double)
Constructs a clamped cubic spline through a set of points.
Public methodCubicSpline(IListDouble, IListDouble, CubicSplineKind)
Constructs the natural cubic spline through a set of points.
Public methodCubicSpline(IListDouble, IListDouble, IListDouble)
Constructs the cubic Hermite spline through a set of points.
Public methodCubicSpline(Double, Double, Double, Double)
Constructs a clamped cubic spline through a set of points.
Public methodCubicSpline(IListDouble, IListDouble, Double, IListDouble)
Constructs a cubic smoothing spline with the specified smoothing parameter.
Public methodCubicSpline(IListDouble, IListDouble, Double, Double)
Constructs a clamped cubic spline through a set of points.
Top
Properties

  NameDescription
Public propertyKind
Gets the type of the cubic spline.
Public propertyNumberOfIntervals
Gets the number of intervals that make up this PiecewiseCurve.
(Inherited from PiecewiseCurve.)
Public propertyParameters
Gets the collection of parameters that determine the shape of this Curve.
(Inherited from Curve.)
Top
Methods

  NameDescription
Public methodClone
Constructs an exact copy of this instance.
(Inherited from Curve.)
Public methodStatic memberCreateAkima(IListPoint)
Constructs the natural cubic spline through a set of points.
Public methodStatic memberCreateAkima(IListDouble, IListDouble)
Constructs the cubic Akima spline through a set of points.
Public methodStatic memberCreateClamped(IListPoint, Double, Double)
Constructs a clamped cubic spline through a set of points.
Public methodStatic memberCreateClamped(IListDouble, IListDouble, Double, Double)
Constructs a clamped cubic spline through a set of points.
Public methodStatic memberCreateHermiteInterpolant(IListPoint, IListDouble)
Constructs the cubic Hermite spline through a set of points.
Public methodStatic memberCreateHermiteInterpolant(IListDouble, IListDouble, IListDouble)
Constructs the cubic Hermite spline through a set of points.
Public methodStatic memberCreateMonotonic(IListPoint)
Constructs a cubic spline through a set of points that preserves monotonicity.
Public methodStatic memberCreateMonotonic(IListDouble, IListDouble)
Constructs a cubic spline through a set of points that preserves monotonicity.
Public methodStatic memberCreateNatural(IListPoint)
Constructs the natural cubic spline through a set of points.
Public methodStatic memberCreateNatural(IListDouble, IListDouble)
Constructs the natural cubic spline through a set of points.
Public methodStatic memberCreateNotAKnot(IListPoint)
Constructs a cubic spline through a set of points with not-a-knot boundary conditions.
Public methodStatic memberCreateNotAKnot(IListDouble, IListDouble)
Constructs a cubic spline through a set of points with not-a-knot boundary conditions.
Public methodStatic memberCreateSmooth(IListPoint, Double)
Constructs a smoothing spline for a set of points with specified smoothing parameter.
Public methodStatic memberCreateSmooth(IListPoint, Double, IListDouble)
Constructs a smoothing spline for a set of points with specified smoothing parameter and weights for the data points.
Public methodStatic memberCreateSmooth(IListDouble, IListDouble, Double)
Constructs a smoothing spline for a set of points with specified smoothing parameter.
Public methodStatic memberCreateSmooth(IListDouble, IListDouble, Double, IListDouble)
Constructs a smoothing spline for a set of points with specified smoothing parameter and weights for the data points.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodFindRoots
Gets the set of X-coordinates where the curve crosses the X-axis.
(Overrides CurveFindRoots.)
Public methodGetCurveFitter
Returns a CurveFitter object that can be used to fit the curve to data.
(Inherited from Curve.)
Public methodGetDataPoint
Gets the data point with the specified index.
(Inherited from PiecewiseCurve.)
Public methodGetDerivative
Returns a Curve that represents the derivative of this Curve.
(Inherited from Curve.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetIntervalPolynomial(Double)
Returns a polynomial that represents the cubic spline at the specified point.
Public methodGetIntervalPolynomial(Int32, Boolean)
Returns a polynomial that represents the cubic spline on the specified interval.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetXValue
Returns the X value of the data point with the specified index.
(Inherited from PiecewiseCurve.)
Public methodGetYValue
Returns the Y value of the data point with the specified index.
(Inherited from PiecewiseCurve.)
Public methodIndexOf
Finds the index of the lower bound of the interval that contains the specfied value.
(Inherited from PiecewiseCurve.)
Public methodIntegral
Gets the definite integral of the curve between the specified X-coordinates.
(Overrides PiecewiseCurveIntegral(Double, Double).)
Protected methodIntegrateOnInterval(Int32)
Returns the value of the integral over the interval with the specified index.
(Overrides PiecewiseCurveIntegrateOnInterval(Int32).)
Protected methodIntegrateOnInterval(Int32, Double, Double)
Returns the integral of the curve over a single interval.
(Overrides PiecewiseCurveIntegrateOnInterval(Int32, Double, Double).)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnParameterChanged
Called after a curve parameter has changed.
(Overrides CurveOnParameterChanged(Int32, Double).)
Protected methodOnParameterChanging
Called before the value of a curve parameter is changed.
(Inherited from PiecewiseCurve.)
Public methodSetDataPoint
Sets the X value of the data point with the specified index.
(Inherited from PiecewiseCurve.)
Public methodSetDataPoints
Sets the data points at the specified indexes.
(Inherited from PiecewiseCurve.)
Public methodSetParameter
Sets a curve parameter to the specified value.
(Inherited from Curve.)
Public methodSetXValue
Sets the X value of the data point with the specified index.
(Inherited from PiecewiseCurve.)
Public methodSetXValues
Sets the X values at the specified indexes.
(Inherited from PiecewiseCurve.)
Public methodSetYValue
Sets the Y value of the data point with the specified index.
(Inherited from PiecewiseCurve.)
Public methodSetYValues
Sets the Y values at the specified indexes.
(Inherited from PiecewiseCurve.)
Public methodSlopeAt
Gets the slope of the curve at the specified X-coordinate.
(Overrides CurveSlopeAt(Double).)
Public methodSolve
Finds the x value where the curve reaches the specified y value.
(Inherited from Curve.)
Public methodTangentAt
Gets the tangent line to the curve at the specified X-coordinate.
(Inherited from Curve.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodValueAt
Gets the Y-value of the curve at the specified X-coordinate.
(Overrides CurveValueAt(Double).)
Top
Remarks

Use the CubicSpline class to interpolate tabulated data, or to approximate a function defined in terms of tabulated data.

A cubic spline is a piecewise curve defined by a third degree polynomial on each interval.

Splines are defined by the data points and some additional conditions. Depending on the nature of these conditions, different types of spline curves arise. There are four kinds of splines. These types are enumerated by the CubicSplineKind type.

A natural spline is a spline curve whose second derivative at the end points are zero. This type of spline tends to minimize the overall curvature of the spline. There is only one natural spline for a given set of data points.

A clamped spline is a spline curve whose slope is fixed at both end points. There is a clamped spline curve for each pair of slopes. Therefore, two parameters must be defined in addition to the data points to specify a clamped spline completely.

Clamped and natural splines have continuous second derivatives.

A cubic Hermite spline is a spline curve whose slope is fixed at each data point. These slopes must be provided by the user. As a result of these additional conditions, the second derivative is no longer continuous.

An Akima spline is a variation of a spline that is robust against outliers. The polynomial on each interval is defined using only a limited number of points. This means that, unlike natural and clamped splines, the effect of an anomalous data point doesn't propagate throughout the curve. Akima splines require only the data points. No other information is needed.

A smoothing spline is a variation of a natural spline that reduces the curvature of the curve at the expense of no longer interpolating the data points.

See Also

Reference

Extreme.Mathematics.Curves Namespace

Copyright (c) 2004-2021 ExoAnalytics Inc.

Send comments on this topic to support@extremeoptimization.com

Copyright © 2004-2021, Extreme Optimization. All rights reserved.
Extreme Optimization, Complexity made simple, M#, and M Sharp are trademarks of ExoAnalytics Inc.
Microsoft, Visual C#, Visual Basic, Visual Studio, Visual Studio.NET, and the Optimized for Visual Studio logo
are registered trademarks of Microsoft Corporation.