Interface BasisPolynomials

All Superinterfaces:
BasisFunctionsCalculatable, BasisFunctionsMultipliable, ConfederateMatrixCalculatable, SimpleBasisPolynomials
All Known Implementing Classes:
Chebyshev, HermiteE, Laguerre, Legendre, LegendreShifted, Monomials, RecurrenceAB, RecurrenceABWithMultiplicationCached

public interface BasisPolynomials extends SimpleBasisPolynomials
Basis of orthogonal polynomials. Contains a few extra methods not available in SimpleBasisPolynomials. Typical implementation is a classic basis such as Chebyshev, Legendre, Laguerre, HermiteE, LegendreShifted, and Monomials; arbitrary three-term recurrence RecurrenceAB is also available.
  • Method Details

    • getNext

      default double[] getNext(int n, double[] Qnm1, double[] Qnm2, BasisFunctionsCalculatable PBASIS)
      Description copied from interface: SimpleBasisPolynomials
      Calculates n-th basis polynomial of this basis in PBASIS basis.
      Specified by:
      getNext in interface SimpleBasisPolynomials
      Parameters:
      n - Q index.
      Qnm1 - Input \( Q_{n-1} \).
      Qnm2 - Input \( Q_{n-2} \).
      PBASIS - The basis in which to calculte.
      Returns:
      \( Q_{n} \) polynomial of this basis in PBASIS basis, array dimension n+1.
    • getNext

      double[] getNext(int n, double[] Qnm1, double[] Qnm2, boolean flag_type2, BasisFunctionsCalculatable PBASIS)
      Calculates n-th basis polynomial of this basis in PBASIS basis.
      Parameters:
      n - T index.
      Qnm1 - Input \( Q_{n-1} \).
      Qnm2 - Input \( Q_{n-2} \).
      flag_type2 - Whether to use type 2 polynomials. If type 2 polynomials are not available --- throw an exception. If not implemented -- an exception will be thrown. This method is typically not the proper way to obtain type 2 polynomials, use the getOrthogonalPolynomialsSecondKindFromAB instead.
      PBASIS - The basis in which to calculte, form this basis we only need P*(a*x+b) operation, that is performed relatively this bais recurrence.
      Returns:
      \( Q_{n} \) polynomial of this basis in PBASIS basis, array dimension n+1.
    • setNewtonBinomialLikeCoefs

      default void setNewtonBinomialLikeCoefs(int n, double[] b, double[] q, double a, double x0)
      Calculates \( Q_n(a*(x+x_0)) \) using 3 term recurrence. Calculations in basis. The \( b_k^{n} \) are defined as: \( Q_n(a*(x+x_0))=\sum_{k=0}^{k=n}b_k^{n} Q_k(x) \) The method should be applied consequently to get \( b_k^{n} \) for n=0,1,2,3,... (in-place calculation). This is a generalization of Newton Binomial (monomials case): \( (a*(x+x_0))^n=a^n\sum x^k x_0^{n-k} C_{n}^{k} \); \( b_k^n= a^n x_0^{n-k} C_{n}^{k} \). This method calculates "Newton Binomial" in arbitrary basis: \( Q_n(a*(x+x_0))=\sum_{k=0}^{k=n}b_k^{n} Q_k(x) \). Actual implementation is special, highly optimized version of getBasisFunctionsOnPolynomialArgument with \( pol(x)=a*(x+x_0) \). The default implementation is very crude and slow (calls getBasisFunctionsOnPolynomialArgument), it is overloaded in actual implementations for speed.

      Typical usage: realtime data moments calculation speed-up by recurrent calculation according to time--shift, see QVMDataP, QVMDataL, and QVMData.
      Parameters:
      n - The max dimension of b.
      b - On input: \( b_k^{n-1} \), on output \( b_k^{n} \).
      q - On input: \( b_k^{n-2} \), on output: \( b_k^{n-1} \).