NonlinearCurve Class

Represents a Curve that can be used for a non-linear regression calculation.

Definition

Remarks

Use the NonlinearCurve class to represent a curve suitable for use in a non-linear curve fitting. The NonlinearCurveFitter class works only with curves that derive from NonlinearCurve. See this class for details on how to perform a least squares fit.

NonlinearCurve is an abstract class and cannot be instantiated directly. Instead, derive your own class from NonlinearCurve, or use one of the predefined classes listed in the following table:

ClassDescription
DampedSineCurveA damped sinusoidal oscillation.
DoubleSigmoidCurveA curve that rises then falls, combining two sigmoids.
ExponentiallyModifiedGaussianCurveAn Exponentially Modified Gaussian for skewed peaks.
NormalCdfCurveAn error function cumulative curve for step-like transitions.
ExponentialCurveA sum of exponential terms.
FourParameterLogisticCurveA standard 4-parameter logistic curve.
FiveParameterLogisticCurveA 5-parameter logistic curve that includes an asymmetry factor.
GaussianCurveA 4-parameter Gaussian 'bell' curve.
GompertzCurveAn asymmetric growth curve.
HillEquationCurveA cooperative binding curve with Hill coefficient.
LogNormalCurveA log-normal distribution curve for skewed data.
LorentzCurveA 4-parameter Lorentz peak curve.
MichaelisMentenCurveA saturation curve for enzyme kinetics.
PowerCurveA power-law relationship for scaling phenomena.
PseudoVoigtCurveA mixed Gaussian-Lorentzian for spectroscopy.
RationalCurveA quotient of two polynomials.
RichardsCurveA flexible growth curve generalizing logistic and Gompertz.
SineCurveA 4-parameter periodic curve.
WeibullCdfCurveA Weibull cumulative distribution for reliability analysis.

Note to inheritors: You must override the ValueAt(Double) method. If possible, you should also override the FillPartialDerivatives(Double, DenseVector<Double>) and SlopeAt(Double) methods. By default, a numerical approximation is used as the derivative.

Constructors

NonlinearCurve Constructs a new NonlinearCurve object.

Properties

Parameters Gets the collection of parameters that determine the shape of this Curve.
(Inherited from Curve)

Methods

Clone Constructs an exact copy of this instance.
(Inherited from Curve)
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FillNumericalPartialDerivatives Fills a dense vector with the partial derivatives of the curve with respect to each of the curve parameters computed using numerical differentiation.
FillPartialDerivatives Fills a dense vector with the partial derivatives of the curve with respect to each of the curve parameters.
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
FindRoots Gets the set of X-coordinates where the curve crosses the X-axis.
(Inherited from Curve)
FromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double>>) Returns a nonlinear curve defined by the specified expression.
FromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double>>) Returns a nonlinear curve defined by the specified expression.
FromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double>>) Returns a nonlinear curve defined by the specified expression.
FromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double>>) Returns a nonlinear curve defined by the specified expression.
FromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double>>) Returns a nonlinear curve defined by the specified expression.
FromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double>>) Returns a nonlinear curve defined by the specified expression.
FromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double>>) Returns a nonlinear curve defined by the specified expression.
FromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double, Double, Double, Double>>) Returns a nonlinear curve defined by the specified expression.
FromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double, Double, Double>>) Returns a nonlinear curve defined by the specified expression.
FromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double, Double>>) Returns a nonlinear curve defined by the specified expression.
FromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double>>) Returns a nonlinear curve defined by the specified expression.
FromExpression(Expression<Func<Double, Double, Double, Double, Double, Double>>) Returns a nonlinear curve defined by the specified expression.
FromExpression(Expression<Func<Double, Double, Double, Double, Double>>) Returns a nonlinear curve defined by the specified expression.
FromExpression(Expression<Func<Double, Double, Double, Double>>) Returns a nonlinear curve defined by the specified expression.
FromExpression(Expression<Func<Double, Double, Double>>) Returns a nonlinear curve defined by the specified expression.
FromExpression(Expression<Func<Double, Double>>) Returns a nonlinear curve defined by the specified expression.
FromFunction(Func<Double, Double, Double>, Double[]) Creates a nonlinear curve from a function with one parameter.
FromFunction(Func<Double, Double, Double, Double>, Double[]) Creates a nonlinear curve from a function with two parameters.
FromFunction(Func<Double, Double, Double, Double, Double>, Double[]) Creates a nonlinear curve from a function with three parameters.
FromFunction(Func<Double, Double, Double, Double, Double, Double>, Double[]) Creates a nonlinear curve from a function with four parameters.
FromFunction(Func<Double, Double, Double, Double, Double, Double, Double>, Double[]) Creates a nonlinear curve from a function with five parameters.
GetCurveFitter Returns a CurveFitter object that can be used to fit the curve to data.
(Overrides Curve.GetCurveFitter())
GetDerivative Returns a Curve that represents the derivative of this Curve.
(Inherited from Curve)
GetGeneratorFromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double>>) Returns a function that on each call returns a new nonlinear curve defined by the specified expression.
GetGeneratorFromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double>>) Returns a function that on each call returns a new nonlinear curve defined by the specified expression.
GetGeneratorFromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double>>) Returns a function that on each call returns a new nonlinear curve defined by the specified expression.
GetGeneratorFromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double>>) Returns a function that on each call returns a new nonlinear curve defined by the specified expression.
GetGeneratorFromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double>>) Returns a function that on each call returns a new nonlinear curve defined by the specified expression.
GetGeneratorFromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double>>) Returns a function that on each call returns a new nonlinear curve defined by the specified expression.
GetGeneratorFromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double>>) Returns a function that on each call returns a new nonlinear curve defined by the specified expression.
GetGeneratorFromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double, Double, Double, Double>>) Returns a function that on each call returns a new nonlinear curve defined by the specified expression.
GetGeneratorFromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double, Double, Double>>) Returns a function that on each call returns a new nonlinear curve defined by the specified expression.
GetGeneratorFromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double, Double>>) Returns a function that on each call returns a new nonlinear curve defined by the specified expression.
GetGeneratorFromExpression(Expression<Func<Double, Double, Double, Double, Double, Double, Double>>) Returns a function that on each call returns a new nonlinear curve defined by the specified expression.
GetGeneratorFromExpression(Expression<Func<Double, Double, Double, Double, Double, Double>>) Returns a function that on each call returns a new nonlinear curve defined by the specified expression.
GetGeneratorFromExpression(Expression<Func<Double, Double, Double, Double, Double>>) Returns a function that on each call returns a new nonlinear curve defined by the specified expression.
GetGeneratorFromExpression(Expression<Func<Double, Double, Double, Double>>) Returns a function that on each call returns a new nonlinear curve defined by the specified expression.
GetGeneratorFromExpression(Expression<Func<Double, Double, Double>>) Returns a function that on each call returns a new nonlinear curve defined by the specified expression.
GetGeneratorFromExpression(Expression<Func<Double, Double>>) Returns a function that on each call returns a new nonlinear curve defined by the specified expression.
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetInitialFitParameters Returns a vector containing initial values for the parameters for a curve fit through on the specified data.
GetPartialDerivatives Returns a vector with the partial derivatives of the curve with respect to each of the curve parameters.
GetTypeGets the Type of the current instance.
(Inherited from Object)
Integral Gets the definite integral of the curve between the specified X-coordinates.
(Inherited from Curve)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
OnParameterChanged Called after a Curve parameter has been changed.
(Inherited from Curve)
OnParameterChanging Called before the value of a curve parameter is changed.
(Inherited from Curve)
SetParameter Sets a curve parameter to the specified value.
(Inherited from Curve)
SlopeAt(Double) Gets the slope of the curve at the specified X-coordinate.
(Inherited from Curve)
SlopeAt(Double[]) Gets the slopes of the curve at the specified X-coordinates.
(Inherited from Curve)
SlopeAt(ReadOnlySpan<Double>) Gets the slopes of the curve at the specified X-coordinates.
(Inherited from Curve)
SlopeAt(Vector<Double>) Gets the slopes of the curve at the specified X-coordinates.
(Inherited from Curve)
SlopeAt(ReadOnlySpan<Double>, Span<Double>) Gets the slopes of the curve at the specified X-coordinates.
(Inherited from Curve)
Solve Finds the x value where the curve reaches the specified y value.
(Inherited from Curve)
TangentAt Gets the tangent line to the curve at the specified X-coordinate.
(Inherited from Curve)
ToStringReturns a string that represents the current object.
(Inherited from Object)
ValueAt(Double) Gets the Y-value of the curve at the specified X-coordinate.
(Inherited from Curve)
ValueAt(Double[]) Gets the Y-values of the curve at the specified X-coordinates.
(Inherited from Curve)
ValueAt(ReadOnlySpan<Double>) Gets the Y-values of the curve at the specified X-coordinates.
(Inherited from Curve)
ValueAt(Vector<Double>) Gets the Y-values of the curve at the specified X-coordinates.
(Inherited from Curve)
ValueAt(ReadOnlySpan<Double>, Span<Double>) Gets the Y-values of the curve at the specified X-coordinates.
(Inherited from Curve)

See Also