public final class TrigonometricPolynomialFunction extends Object implements DifferentiableIntegrableUnivariateFunction, Serializable
a0
, and two arrays of same
lengths a
and b
,
the corresponding trigonometric polynomial function p
is given
by the following expression : p(x) = a0 + sum( a(k) * cos(k*x) + b(k) * sin(k*x) , k, 1, n )
a(k)
(resp . b(k)
) is the kth coefficient of the array a
(resp. b
).Constructor and Description |
---|
TrigonometricPolynomialFunction(double coefA0,
double[] coefA,
double[] coefB)
Constructor for the
TrigonometricPolynomialFunction . |
public TrigonometricPolynomialFunction(double coefA0, double[] coefA, double[] coefB)
TrigonometricPolynomialFunction
. This constructor creates the following trigonometric
polynomial : P(X) = a0 + a(k) * cos(kX) + b(k) * sin(kX)
coefA0
- a0 coefficientcoefA
- cosine coefficients arraycoefB
- sine coefficients arrayMathIllegalArgumentException
- if arrays a and b are of different lengthspublic TrigonometricPolynomialFunction add(TrigonometricPolynomialFunction newPol)
TrigonometricPolynomialFunction
newPol
- polynomial to add to currentpublic UnivariateFunction derivative()
public UnivariateFunction derivative(int n)
n
- order of derivativeprotected static TrigonometricPolynomialFunction elementaryMultiplication(TrigonometricPolynomialFunction poly, ElementaryMultiplicationTypes.ElementaryType type, int j)
TrigonometricPolynomialFunction
by an ElementaryMultiplicationTypes
poly
- polynomialtype
- of elementary polynomialj
- order of elementary polynomialprotected static double evaluate(TrigonometricPolynomialFunction poly, double x)
P(x) = a0 + a(k) * cos(kx) + b(k) * sin(kx)
poly
- polynomial to evaluatex
- abscissa of desired valuepublic double[] getA()
public double getA0()
public double[] getB()
public int getDegree()
public TrigonometricPolynomialFunction multiply(TrigonometricPolynomialFunction polynomial)
polynomial
- polynomial to multiply instance bypublic TrigonometricPolynomialFunction negate()
public TrigonometricPolynomialFunction polynomialDerivative()
TrigonometricPolynomialFunction
.public TrigonometricPolynomialFunction polynomialDerivative(int order)
TrigonometricPolynomialFunction
.order
- order of derivative (must be > 0)protected static TrigonometricPolynomialFunction polynomialDerivative(TrigonometricPolynomialFunction poly)
TrigonometricPolynomialFunction
.poly
- polynomial to derivatepublic TrigonometricPolynomialPrimitive polynomialPrimitive(double constant)
TrigonometricPolynomialFunction
constant
- integration constantTrigonometricPolynomialPrimitive
protected static TrigonometricPolynomialPrimitive polynomialPrimitive(TrigonometricPolynomialFunction poly, double constant)
TrigonometricPolynomialFunction
poly
- polynomial for primitive computationconstant
- integration constantTrigonometricPolynomialPrimitive
public UnivariateFunction primitive()
TrigonometricPolynomialFunction
primitive
in interface IntegrableUnivariateFunction
UnivariateFunction
public TrigonometricPolynomialFunction scalarAdd(double scalar)
scalar
- to addTrigonometricPolynomialFunction
public TrigonometricPolynomialFunction scalarMultiply(double scalar)
scalar
- to multiply polynomial bypublic TrigonometricPolynomialFunction scalarSubtract(double scalar)
scalar
- to subtractTrigonometricPolynomialFunction
public TrigonometricPolynomialFunction scalarDivide(double scalar)
scalar
- to divide polynomial bypublic TrigonometricPolynomialFunction subtract(TrigonometricPolynomialFunction polynomial)
polynomial
- to perform subtractionthis - polynomial
public String toString()
public double value(double x)
value
in interface UnivariateFunction
x
- desired abscissapublic double value(int n, double x)
n
- order of derivativex
- desired abscissapublic DerivativeStructure value(DerivativeStructure t)
UnivariateDifferentiableFunction
classes compute both the value and the first derivative of the function.
value
in interface UnivariateDifferentiableFunction
t
- function input valueCopyright © 2018 CNES. All Rights Reserved.