Package jline.lib.lti

Class iltcme

java.lang.Object
jline.lib.lti.iltcme

public final class iltcme extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    One row of the pre-computed CME parameter table.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The evaluation budget used when a caller does not name one.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.apache.commons.math3.complex.Complex[][]
    abateWhittWeights(int maxFnEvals, String method)
    Compute the Abate-Whitt eta and beta weight vectors for the given method and evaluation budget.
    static double[]
    ilt(UnaryOperator<org.apache.commons.math3.complex.Complex> fun, double[] T)
    ilt with the default budget and the default "cme" method.
    static double[]
    ilt(UnaryOperator<org.apache.commons.math3.complex.Complex> fun, double[] T, int maxFnEvals)
    ILT with the default method "cme".
    static double[]
    ilt(UnaryOperator<org.apache.commons.math3.complex.Complex> fun, double[] T, int maxFnEvals, String method)
    Compute the inverse Laplace transform of fun at time points T.
    static double[]
    ilt(UnaryOperator<org.apache.commons.math3.complex.Complex> fun, double[] T, String method)
    ilt with the default budget.
    static double[][][]
    iltMatrix(Function<org.apache.commons.math3.complex.Complex,org.apache.commons.math3.complex.Complex[][]> fun, double[] T, int maxFnEvals)
     
    static double[][][]
    iltMatrix(Function<org.apache.commons.math3.complex.Complex,org.apache.commons.math3.complex.Complex[][]> fun, double[] T, int maxFnEvals, String method)
    Matrix-valued inverse Laplace transform.
    Returns the pre-computed CME parameter table from iltcme.json.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_MAX_FN_EVALS

      public static final int DEFAULT_MAX_FN_EVALS
      The evaluation budget used when a caller does not name one. 41 is the EULER optimum in double precision, and harmless for the other two methods. Euler's weights carry 10^((n-1)/6) against an ALTERNATING sum, so accuracy is a race between the series converging and the cancellation eating the mantissa: on F(s) = 2/(s+2), whose inverse is 2*exp(-2t), the worst relative error over t in {0.1, 0.5, 1, 2} is 4.4e-3 at 11, 1.6e-10 at 41, 4.7e-8 at 51 and 1.4e+0 at 99 -- where the scale reaches 2.2e16, past what a double resolves, and the answer goes NEGATIVE.
      See Also:
  • Method Details

    • parameters

      public static List<iltcme.CmeEntry> parameters()
      Returns the pre-computed CME parameter table from iltcme.json. The table is loaded once and cached, and is shared by the inverse Laplace transform below and by the CME distribution class. The returned list is the cached object, so callers must not modify it.
      Returns:
      the CME parameter table
    • ilt

      public static double[] ilt(UnaryOperator<org.apache.commons.math3.complex.Complex> fun, double[] T)
      ilt with the default budget and the default "cme" method.
    • ilt

      public static double[] ilt(UnaryOperator<org.apache.commons.math3.complex.Complex> fun, double[] T, String method)
      ilt with the default budget.
    • ilt

      public static double[] ilt(UnaryOperator<org.apache.commons.math3.complex.Complex> fun, double[] T, int maxFnEvals, String method)
      Compute the inverse Laplace transform of fun at time points T.
      Parameters:
      fun - Laplace transform function F(s), operating on Complex
      T - array of time points (must be positive)
      maxFnEvals - maximum number of function evaluations allowed
      method - "cme" (default), "euler", or "gaver"
      Returns:
      array of f(t) values
    • iltMatrix

      public static double[][][] iltMatrix(Function<org.apache.commons.math3.complex.Complex,org.apache.commons.math3.complex.Complex[][]> fun, double[] T, int maxFnEvals, String method)
      Matrix-valued inverse Laplace transform. Evaluates the matrix-valued transform fun once per Abate-Whitt node and accumulates the full (complex) matrix, sharing the eta/beta weights with the scalar overload.
      Parameters:
      fun - Laplace transform F(s) returning an nr x nc complex matrix
      T - array of time points (must be positive)
      maxFnEvals - maximum number of function evaluations allowed
      method - "cme" (default), "euler", or "gaver"
      Returns:
      f(t) as a double[T.length][nr][nc] array (real part)
    • iltMatrix

      public static double[][][] iltMatrix(Function<org.apache.commons.math3.complex.Complex,org.apache.commons.math3.complex.Complex[][]> fun, double[] T, int maxFnEvals)
    • abateWhittWeights

      public static org.apache.commons.math3.complex.Complex[][] abateWhittWeights(int maxFnEvals, String method)
      Compute the Abate-Whitt eta and beta weight vectors for the given method and evaluation budget. Returned as {eta, beta}. Public because it is the one copy of the Euler and Gaver-Stehfest weights in the JAR: callers that need a variant of the sum (e.g. Qsys_mg1_ps.ilt) reuse it.
    • ilt

      public static double[] ilt(UnaryOperator<org.apache.commons.math3.complex.Complex> fun, double[] T, int maxFnEvals)
      ILT with the default method "cme".