Package gov.nih.mipav.model.algorithms
Class InverseLaplace
java.lang.Object
gov.nih.mipav.model.algorithms.InverseLaplace
- Direct Known Subclasses:
AlgorithmFRAP.FitExpModel,InverseLaplaceTest.FitdeHoog1,InverseLaplaceTest.FitdeHoog10,InverseLaplaceTest.FitdeHoog11,InverseLaplaceTest.FitdeHoog12,InverseLaplaceTest.FitdeHoog13,InverseLaplaceTest.FitdeHoog14,InverseLaplaceTest.FitdeHoog15,InverseLaplaceTest.FitdeHoog16,InverseLaplaceTest.FitdeHoog2,InverseLaplaceTest.FitdeHoog3,InverseLaplaceTest.FitdeHoog4,InverseLaplaceTest.FitdeHoog5,InverseLaplaceTest.FitdeHoog6,InverseLaplaceTest.FitdeHoog7,InverseLaplaceTest.FitdeHoog8,InverseLaplaceTest.FitdeHoog9
This is a port of the MATLAB INVLAP.M, a numerical inverse Laplace transform using the de Hoog algorithm, copyright
by Karl Hollenbeck on November 22, 1996, Department of Hydrodynamics and Water Resources, Technical University of
Denmark, DK-2800 Lyngby email:karl@isv16.isva.dtu.dk Downloaded from MATLAB central in ECP1 Software.zip.
The algorithm used is deHoog et al's quotient difference method with accelerated convergence for the continued fraction expansion published in "An improved method for numerical inversion of Laplace transforms" by F. R. de Hoog, J. H. Knight, and A. N. Stokes, SIAM Journal on Scientific and Statistical Computing, Vol. 3, No. 3, September, 1982, pp. 357-366.
Hollenbeck algorithm modification: The time vector is split in segments of equal magnitude which are inverted individually. This gives better overall accuracy.
From the original MATLAB source code:
Copyright: Karl Hollenbeck Department of Hydrodynamics and Water Resources Technical University of Denmark, DK-2800 Lyngby email: karl@isv16.isva.dtu.dk 22 Nov 1996, MATLAB 5 version 27 Jun 1997 updated 1 Oct 1998 IF YOU PUBLISH WORK BENEFITING FROM THIS M-FILE, PLEASE CITE IT AS: Hollenbeck, K. J. (1998) INVLAP.M: A matlab function for numerical inversion of Laplace transforms by the de Hoog algorithm, http://www.isva.dtu.dk/staff/karl/invlap.htm
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleDon't include a time == 0.private double[]DOCUMENT ME!private double[]DOCUMENT ME!private double[]resulting vector of real-space values.private doublenumerical tolerance of approaching pole (default 1.0e-9).private intDOCUMENT ME! -
Constructor Summary
ConstructorsConstructorDescriptionInverseLaplace(double[] time) Constructor for InverseLaplace.InverseLaplace(double[] time, double largestPole, double tol) Constructor for InverseLaplace. -
Method Summary
Modifier and TypeMethodDescriptionvoiddriver()driver.abstract double[][]fitToLaplace(double realS, double[] imagS) Returns 'a' coefficients in power series where the second index is 0 for the real part and 1 for the imaginary part.double[]getTimeFunction.
-
Field Details
-
largestPole
private double largestPoleDon't include a time == 0. This will give a -inifinity when the log of the time is taken. largest pole of Laplace space function (default zero) Note that InverseLaplace may give incorrect results if the default value of largestPole is used. For example, the function exp(t) with the Laplace transform 1/(s-1) will give correct results if largestPole is set to 1.0, but will return incorrect negative values for time >= 1.0 if the largestPole default of 0.0 is used. -
logT
private double[] logTDOCUMENT ME! -
time
private double[] timeDOCUMENT ME! -
timeFunction
private double[] timeFunctionresulting vector of real-space values. -
tol
private double tolnumerical tolerance of approaching pole (default 1.0e-9). -
tPts
private int tPtsDOCUMENT ME!
-
-
Constructor Details
-
InverseLaplace
public InverseLaplace(double[] time) Constructor for InverseLaplace.- Parameters:
time- DOCUMENT ME!
-
InverseLaplace
public InverseLaplace(double[] time, double largestPole, double tol) Constructor for InverseLaplace.- Parameters:
time- DOCUMENT ME!largestPole- DOCUMENT ME!tol- DOCUMENT ME!
-
-
Method Details
-
fitToLaplace
public abstract double[][] fitToLaplace(double realS, double[] imagS) Returns 'a' coefficients in power series where the second index is 0 for the real part and 1 for the imaginary part.- Parameters:
realS- DOCUMENT ME!imagS- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
driver
public void driver()driver. -
getTimeFunction
public double[] getTimeFunction()getTimeFunction.- Returns:
- timeFunction
-