Package com.polytechnik.freemoney
Interface CommonBasisOperations
- All Known Implementing Classes:
CommonlyUsedMoments
,CommonlyUsedMomentsLaguerre
,CommonlyUsedMomentsLegendreShifted
,CommonlyUsedMomentsMonomials
public interface CommonBasisOperations
A simple container for common basis operations.
Includes the basis itself
getABasis()
and variation-by-parts
helpers for specific integration weight and basis used.-
Method Summary
Modifier and TypeMethodDescriptionThe basis.double[]
getDFMomentsFromF
(double[] Fmoments) Obtain \(\left<\frac{dF}{dt}Q_k\right>\) moments from \(\left<FQ_k\right>\) moments.double[]
getdtMoments
(int n) Return the moments <Qk>,k=0..n-1
, for the measure and basis used.double[]
getEDPsi
(double[] psi) Return time--variation |psi>.getEmptyWIntegrator
(int ntm, double atau, int nobservables) default double[]
getFMomentsFromDF
(double[] dFmoments) Obtain \(\left<FQ_k\right>\) moments from \(\left<\frac{dF}{dt}Q_k\right>\) moments using integration by parts andgetPolynomialWIntegratedDt(double[])
.double[]
getPolynomialWIntegratedDt
(double[] polynomial) Integrate a polynomial as \(R(x)\omega(t)=\int_{-\infty}^{t} P(x(t))\omega(t)dt\).default double[]
getPsi2WIntegratedDt
(double[] psi) static double[]
getTransformFMomentsFromDF
(Function<double[], double[]> getPolynomialWIntegratedDt, double[] dFmoments) A helper method to obtain \(\left<FQ_k\right>\) moments from \(\left<\frac{dF}{dt}Q_k\right>\) moments.
-
Method Details
-
getdtMoments
double[] getdtMoments(int n) Return the moments <Qk>,k=0..n-1
, for the measure and basis used. -
getEDPsi
double[] getEDPsi(double[] psi) Return time--variation |psi>. Typically a linear function onpsi
and the derivative ofpsi
multiplied by a weight-dependent polynomial. -
getPolynomialWIntegratedDt
double[] getPolynomialWIntegratedDt(double[] polynomial) Integrate a polynomial as \(R(x)\omega(t)=\int_{-\infty}^{t} P(x(t))\omega(t)dt\). The result \(R(x)\) is weight-dependent and does not exist for some bases, the classCommonBasisOperations
is intendent to be used only for the weights and bases with analytically available integration. -
getABasis
OrthogonalPolynomialsBasisFunctionsCalculatable<? extends BasisFunctionsCalculatable> getABasis()The basis. -
getFMomentsFromDF
default double[] getFMomentsFromDF(double[] dFmoments) Obtain \(\left<FQ_k\right>\) moments from \(\left<\frac{dF}{dt}Q_k\right>\) moments using integration by parts andgetPolynomialWIntegratedDt(double[])
. The default implementation usesgetTransformFMomentsFromDF(java.util.function.Function<double[], double[]>, double[])
helper method.- See Also:
-
getDFMomentsFromF
double[] getDFMomentsFromF(double[] Fmoments) Obtain \(\left<\frac{dF}{dt}Q_k\right>\) moments from \(\left<FQ_k\right>\) moments.- See Also:
-
getEmptyWIntegrator
-
getPsi2WIntegratedDt
default double[] getPsi2WIntegratedDt(double[] psi) -
getTransformFMomentsFromDF
static double[] getTransformFMomentsFromDF(Function<double[], double[]> getPolynomialWIntegratedDt, double[] dFmoments) A helper method to obtain \(\left<FQ_k\right>\) moments from \(\left<\frac{dF}{dt}Q_k\right>\) moments. Can be used for other thanCommonBasisOperations
data sources.
-