public final class FourierSeries extends Object implements DifferentiableIntegrableUnivariateFunction, Serializable
FourierDecompositionEngine
,
Serialized FormConstructor and Description |
---|
FourierSeries(double omega,
double a0,
double[] a,
double[] b)
Constructor for the
FourierSeries . |
Modifier and Type | Method and Description |
---|---|
UnivariateFunction |
derivative()
Compute and return derivative of polynomial
|
UnivariateFunction |
derivative(int n)
Compute and return nth derivative of polynomial
|
double |
derivativeValue(int n,
double x)
Return value at x of nth order derivative
|
protected static double |
evaluate(FourierSeries poly,
double x)
Compute value at x of trigonometric polynomial P :
P(x) = a0 + a(k) * cos(kx) + b(k) * sin(kx) |
double |
getAngularFrequency() |
double |
getConstant() |
double[] |
getCosArray() |
int |
getOrder() |
double |
getPeriod() |
double[] |
getSinArray() |
FourierSeries |
negate()
Negate polynomial
|
FourierSeries |
polynomialDerivative()
Returns the first order derivative as a
TrigonometricPolynomialFunction . |
protected static FourierSeries |
polynomialDerivative(FourierSeries poly)
Returns the derivative as a
TrigonometricPolynomialFunction . |
FourierSeries |
polynomialDerivative(int order)
Returns the nth order derivative as a
TrigonometricPolynomialFunction . |
FourierSeries |
polynomialPrimitive()
Get primitive of
FourierSeries . |
protected static FourierSeries |
polynomialPrimitive(FourierSeries poly)
Get primitive of
FourierSeries . |
UnivariateFunction |
primitive()
Get primitive of
TrigonometricPolynomialFunction |
double |
primitiveValue(double x)
Return value at x of the function primitive
|
FourierSeries |
scalarAdd(double scalar)
Add a scalar
|
FourierSeries |
scalarDivide(double scalar)
Divide by a scalar
|
FourierSeries |
scalarMultiply(double scalar)
Multiply by a scalar
|
FourierSeries |
scalarSubtract(double scalar)
Subtract a scalar
|
String |
toString()
Get String representation of polynomial
|
DerivativeStructure |
value(DerivativeStructure t)
Simple mathematical function.
|
double |
value(double x)
Return value at x of polynomial.
|
public FourierSeries(double omega, double a0, double[] a, double[] b)
FourierSeries
. This constructor creates the following trigonometric
polynomial : P(X) = a0 + a(k) * cos(k * omega * X) + b(k) * sin(k * omega * X)
omega = 2 * pi / period
omega
- angular frequencya0
- a0 coefficienta
- cosine coefficients arrayb
- sine coefficients arrayMathIllegalArgumentException
- if arrays a and b are of different lengthspublic FourierSeries scalarAdd(double scalar)
scalar
- to addTrigonometricPolynomialFunction
public FourierSeries scalarMultiply(double scalar)
scalar
- to multiply polynomial bypublic FourierSeries scalarSubtract(double scalar)
scalar
- to subtractTrigonometricPolynomialFunction
public FourierSeries scalarDivide(double scalar)
scalar
- to divide polynomial bypublic FourierSeries negate()
public FourierSeries polynomialDerivative()
TrigonometricPolynomialFunction
.public FourierSeries polynomialDerivative(int order)
TrigonometricPolynomialFunction
.order
- order of derivative (must be > 0)protected static FourierSeries polynomialDerivative(FourierSeries poly)
TrigonometricPolynomialFunction
.poly
- polynomial to derivatepublic FourierSeries polynomialPrimitive()
FourierSeries
. aFourierSeries
protected static FourierSeries polynomialPrimitive(FourierSeries poly)
FourierSeries
. apoly
- polynomial for primitive computationFourierSeries
public double value(double x)
value
in interface UnivariateFunction
x
- desired abscissapublic double derivativeValue(int n, double x)
n
- order of derivativex
- desired abscissapublic double primitiveValue(double x)
x
- desired abscissaprotected static double evaluate(FourierSeries poly, double x)
P(x) = a0 + a(k) * cos(kx) + b(k) * sin(kx)
poly
- polynomial to evaluatex
- abscissa of desired valuepublic UnivariateFunction primitive()
TrigonometricPolynomialFunction
primitive
in interface IntegrableUnivariateFunction
UnivariateFunction
public UnivariateFunction derivative()
public UnivariateFunction derivative(int n)
n
- order of derivativepublic double getAngularFrequency()
public double getPeriod()
public double getConstant()
public double[] getCosArray()
public double[] getSinArray()
public int getOrder()
public String toString()
public 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 © 2019 CNES. All Rights Reserved.