Class FourierSeries

  • All Implemented Interfaces:
    java.util.function.DoubleUnaryOperator, java.util.function.Function<java.lang.Double,​java.lang.Double>, java.util.function.UnaryOperator<java.lang.Double>, BasicFunction, PrimitiveFunction.Unary, UnaryFunction<java.lang.Double>

    public class FourierSeries
    extends java.lang.Object
    implements PrimitiveFunction.Unary
    This is the real coefficient trigonometric form of the Fourier series.
    • Field Detail

      • myAngularFrequency

        private final double myAngularFrequency
      • myCosCoefficients

        private final double[] myCosCoefficients
      • mySinCoefficients

        private final double[] mySinCoefficients
    • Constructor Detail

      • FourierSeries

        public FourierSeries​(double period,
                             ComplexNumber... coefficients)
        Parameters:
        period - The period of the function
        coefficients - The Fourier coefficients. The first coefficient is the constant term (the real part of that complex number), then the following coefficients are the coefficients of the cos and sin terms with increasing frequency.
      • FourierSeries

        FourierSeries​(double period,
                      double[] cosCoefficients,
                      double[] sinCoefficients)