Approximation Type

Constructors

Constructor Description

Approximation()

Full Usage: Approximation()

Returns: Approximation
Returns: Approximation

Static members

Static member Description

Approximation.approxWithPolynomial (f, i, n, spacing)

Full Usage: Approximation.approxWithPolynomial (f, i, n, spacing)

Parameters:
    f : float -> float - Function that should be approximated by a polynomial interpolating function.
    i : Interval<float> - Interval for which the function should be approximated
    n : int - number of points that should be placed within the interval (incl. start and end)
    spacing : Spacing - X values can be spaced equally or according to chebyshev.

Returns: PolynomialCoef Coefficients for polynomial interpolation. Use Polynomial.fit to predict function values.

Determines polynomial coefficients to approximate the given function with (i) n equally spaced nodes or (ii) n nodes spaced according to Chebyshev. Use Polynomial.fit to get a polynomial function of the coefficients.

f : float -> float

Function that should be approximated by a polynomial interpolating function.

i : Interval<float>

Interval for which the function should be approximated

n : int

number of points that should be placed within the interval (incl. start and end)

spacing : Spacing

X values can be spaced equally or according to chebyshev.

Returns: PolynomialCoef

Coefficients for polynomial interpolation. Use Polynomial.fit to predict function values.

Approximation.approxWithPolynomialFromValues (xData, yData, n, spacing)

Full Usage: Approximation.approxWithPolynomialFromValues (xData, yData, n, spacing)

Parameters:
    xData : seq<float> - Note: Must not contain duplicate x values (use Approximation.regularizeValues to preprocess data!)
    yData : seq<float> - vector of y values
    n : int - number of points that should be placed within the interval (incl. start and end)
    spacing : Spacing - X values can be spaced equally or according to chebyshev.

Returns: PolynomialCoef Coefficients for polynomial interpolation. Use Polynomial.fit to predict function values.

Determines polynomial coefficients to approximate the given data with (i) n equally spaced nodes or (ii) n nodes spaced according to Chebyshev. Use Polynomial.fit to get a polynomial function of the coefficients.

xData : seq<float>

Note: Must not contain duplicate x values (use Approximation.regularizeValues to preprocess data!)

yData : seq<float>

vector of y values

n : int

number of points that should be placed within the interval (incl. start and end)

spacing : Spacing

X values can be spaced equally or according to chebyshev.

Returns: PolynomialCoef

Coefficients for polynomial interpolation. Use Polynomial.fit to predict function values.