Package com.polytechnik.freemoney
Class WIntegratorLegendreShifted
java.lang.Object
com.polytechnik.freemoney.WIntegrator
com.polytechnik.freemoney.WIntegratorLegendreShifted
A simple accumulator with integration in shifted Legendre basis.
- See Also:
-
Field Summary
FieldsFields inherited from class com.polytechnik.freemoney.WIntegrator
atau, currenttime_previous, integration_moments, nobservables, ntm, sum
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSingleObservationToSomeObservables
(long currenttime, long t, double[] Fdt, int staringSerieIndex) Add a single observation at time t to a range of stored series.static double[]
getDtMoments
(int nmoms) The moments of the measure \int Q(x)w(x)dt.static double[]
getEDPsi
(double[] psi) Infinitesimal time--shift.static double[]
getPolynomialWIntegratedDt
(double[] polynomial) Integrate by parts (with the weight) a polynomial.static double[]
getPsi2WIntegratedDt
(double[] psi) Square, then integrate by parts (with the weight) a wavefunction.double
getXFromTime
(long currenttime, long t) Basis function argumentx=exp(-(currenttime-t)/atau)
.void
updateSavedMomentsToNewTimeReference
(long currenttime) Recurrently update saved moments to new currenttime.Methods inherited from class com.polytechnik.freemoney.WIntegrator
addSingleObservation
-
Field Details
-
B
-
-
Constructor Details
-
WIntegratorLegendreShifted
public WIntegratorLegendreShifted(int ntm, double atau, int nobservables)
-
-
Method Details
-
updateSavedMomentsToNewTimeReference
public void updateSavedMomentsToNewTimeReference(long currenttime) Recurrently update saved moments to new currenttime.- Specified by:
updateSavedMomentsToNewTimeReference
in classWIntegrator
-
getXFromTime
public double getXFromTime(long currenttime, long t) Basis function argumentx=exp(-(currenttime-t)/atau)
.- Specified by:
getXFromTime
in classWIntegrator
-
addSingleObservationToSomeObservables
public void addSingleObservationToSomeObservables(long currenttime, long t, double[] Fdt, int staringSerieIndex) Description copied from class:WIntegrator
Add a single observation at time t to a range of stored series. No basis time-shift is performed, theWIntegrator.updateSavedMomentsToNewTimeReference(long)
should be called separately.- Specified by:
addSingleObservationToSomeObservables
in classWIntegrator
- Parameters:
currenttime
- Current time.t
- Event time.Fdt
- The observables, to be added starting with staringSerieIndex (inclusive).staringSerieIndex
- The serie index, the data will be added toWIntegrator.integration_moments
[staringSerieIndex]..WIntegrator.integration_moments
[staringSerieIndex+Fdt.length-1].
-
getPsi2WIntegratedDt
public static double[] getPsi2WIntegratedDt(double[] psi) Square, then integrate by parts (with the weight) a wavefunction. A helper function for shifted Legendre basis. -
getPolynomialWIntegratedDt
public static double[] getPolynomialWIntegratedDt(double[] polynomial) Integrate by parts (with the weight) a polynomial. A helper function for shifted Legendre basis. -
getEDPsi
public static double[] getEDPsi(double[] psi) Infinitesimal time--shift. Calculates psi/2+x*psi'. A helper function for shifted Legendre basis. -
getDtMoments
public static double[] getDtMoments(int nmoms) The moments of the measure \int Q(x)w(x)dt.
-