|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.math3.analysis.polynomials.FourierSeries
public final class FourierSeries
This class represents a finite Fourier Series
FourierDecompositionEngine
,
Serialized FormConstructor Summary | |
---|---|
FourierSeries(double omega,
double a0,
double[] a,
double[] b)
Constructor for the FourierSeries . |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
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 array
MathIllegalArgumentException
- if arrays a and b are of different lengthsMethod Detail |
---|
public FourierSeries scalarAdd(double scalar)
scalar
- to add
TrigonometricPolynomialFunction
public FourierSeries scalarMultiply(double scalar)
scalar
- to multiply polynomial by
public FourierSeries scalarSubtract(double scalar)
scalar
- to subtract
TrigonometricPolynomialFunction
public FourierSeries scalarDivide(double scalar)
scalar
- to divide polynomial by
public 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 derivate
public FourierSeries polynomialPrimitive()
FourierSeries
. a
FourierSeries
protected static FourierSeries polynomialPrimitive(FourierSeries poly)
FourierSeries
. a
poly
- polynomial for primitive computation
FourierSeries
public double value(double x)
value
in interface UnivariateFunction
x
- desired abscissa
public double derivativeValue(int n, double x)
n
- order of derivativex
- desired abscissa
public double primitiveValue(double x)
x
- desired abscissa
protected 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 value
public UnivariateFunction primitive()
TrigonometricPolynomialFunction
primitive
in interface IntegrableUnivariateFunction
UnivariateFunction
public UnivariateFunction derivative()
public UnivariateFunction derivative(int n)
n
- order of derivative
public double getAngularFrequency()
public double getPeriod()
public double getConstant()
public double[] getCosArray()
public double[] getSinArray()
public int getOrder()
public String toString()
toString
in class Object
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 value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |