Package gov.nih.mipav.model.algorithms
Class NLConstrainedEngine
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.NLConstrainedEngine
-
- Direct Known Subclasses:
AlgorithmAutoCorrelation.FitCorrelationModel,AlgorithmAutoCovariance.FitCovarianceModel,AlgorithmConstELSUNCOpt3D.FitOAR3DConstrainedModel,AlgorithmContrastEnhancementUsingExposureFusion.kFitting,AlgorithmDEMRI3.Fit24DModel,AlgorithmDEMRI3.Fit25HModel,AlgorithmDEMRI3.FitDEMRI3ConstrainedModel,AlgorithmELSUNCOpt2D.FitOAR2DELSUNCModel,AlgorithmELSUNCOpt3D.FitOAR3DELSUNCModel,AlgorithmFRAP.Fit24DModel,AlgorithmFRAP.FitDoubleExponentialModel,AlgorithmFRAP.FitDoubleExponentialNoWholeConstrainedModel,AlgorithmFRAP.FitDoubleExponentialNoWholeModel,AlgorithmFRAP.FitIntensityProfile,AlgorithmFRAP.FitPure1DModel,AlgorithmFRAP.FitSingleExponentialModel,AlgorithmFRAP.FitWholeNLConInt2,AlgorithmFRAP.FitWholeNLConModel,AlgorithmFRAP.FitWholeNLConModel2,AlgorithmFRAP.FitWholeNLConModel3,AlgorithmFRAP.FitWholeNLConModelqd,AlgorithmSM2.FitAll,AlgorithmSM2.FitSM2ConstrainedModel,AlgorithmSM2.FitSM2ConstrainedModelC,AlgorithmTimeFitting.FitExponential,AlgorithmTimeFitting.FitGaussian,AlgorithmTimeFitting.FitLaplace,AlgorithmTimeFitting.FitLine,AlgorithmTimeFitting.FitLorentz,AlgorithmTimeFitting.FitMultiExponential,AlgorithmTimeFitting.FitRayleigh,DSC_MRI_toolbox.gauss1Fitting,DSC_MRI_toolbox.gauss2Fitting,DSC_MRI_toolbox.gaussStandardDeviationFitting,DSC_MRI_toolbox.GVFitting,DSC_MRI_toolbox.GVRecirculation,NLFittedFunction,SchwarzChristoffelMapping.crpfun,SchwarzChristoffelMapping.depfun,SchwarzChristoffelMapping.dpfun,SchwarzChristoffelMapping.rpfun,SchwarzChristoffelMapping2.hppfun,SchwarzChristoffelMapping2.stpfun,SIFT.FitMosaicModel,WeibullDistribution.WeibullCostFunction2param,WeibullDistribution.WeibullCostFunction3param
public abstract class NLConstrainedEngine extends java.lang.ObjectDisplay results of displaying exponential fitting parameters.
-
-
Field Summary
Fields Modifier and Type Field Description protected double[]aOn completion if exitStatus >= 0 a[] contains the latest (best) estimate of the solution point.private doublea1div3DOCUMENT ME!protected doubleabsoluteConvergenceabsolute convergence constant Used to test for convergence by the sum of squares being less than the absoluteConvergence squared.private doubleaDiffDOCUMENT ME!private doublealfkm1DOCUMENT ME!private doublealfkm2DOCUMENT ME!private doublealfnoiDOCUMENT ME!private doublealphaDOCUMENT ME!private doublealphupDOCUMENT ME!protected booleananalyticalJacobianprivate int[]aset1D integer array of length param containing a code which indicates whether an unknown is active or not aset[i] = 0 when a[i] is free = +1 when a[i] == bl[i] = -1 when a[i] == bu[i].private doubleaupkm1DOCUMENT ME!private intBARDprivate intBEALEprivate doublebestpgDOCUMENT ME!private doublebetascalar containing the norm of the orthogonal projection of residuals onto the space spanned by the columns of the Jacobian.private doublebetkm1DOCUMENT ME!private doublebetkm2DOCUMENT ME!private static doublebigDOCUMENT ME!private intBIGGS_EXP6protected double[]blDOCUMENT ME!private doublebl0DOCUMENT ME!private doublebnDOCUMENT ME!protected intboundsinteger scalar code for assessing the bounds bounds = 0 means an unconstrained problem bounds = 1 means the same lower bounds for all unknowns and the same upper bounds for all unknowns.private intBOX_3Dprivate intBROWN_ALMOST_LINEARprivate intBROWN_AND_DENNISprivate intBROWN_BADLY_SCALEDprivate intBROYDEN_BANDEDprivate intBROYDEN_TRIDIAGONALprotected double[]buDOCUMENT ME!private doublebu0DOCUMENT ME!private intCERES_CURVE_FITTINGprivate intCHEBYQUADprivate doublecnormDOCUMENT ME!private intconstraintActNumber of active constraints.private intctrlctrl can have 3 different values on entry.protected int[]ctrlMatWrapper for ctrl or lctrl communication with driver.private doubled1km1DOCUMENT ME!private doubled1sqsscalar containing the predicted reduction in the objective function if gn-direction is used.private doubledeltaMinrmDOCUMENT ME!private double[]diag1D double array of length param conatiaing the diagonal elements of the diagonal matrix D if internalScaling is true.private intDISCRETE_BOUNDARY_VALUEprivate intDISCRETE_INTEGRALprivate intDRAPER24Dprivate double[]dxdouble working areas 1D array of length param containing the solution of J * dx = -residuals.private doubledxnkm1DOCUMENT ME!private doubledxnormDOCUMENT ME!protected double[]dydaDOCUMENT ME!private doubleepsDOCUMENT ME!private doubleepslDOCUMENT ME!private intEQUILIBRIUM_COMBUSTIONprivate interrorStatusDOCUMENT ME!private intevalDOCUMENT ME!private intexitStatusinteger scalar that indicates why the return was taken.private doubleexp0p1private double[]expap1private intEXTENDED_POWELL_SINGULARprivate intEXTENDED_ROSENBROCKprivate intFREUDENSTEIN_AND_ROTHprivate doublefsqkm1DOCUMENT ME!private doublefsumDOCUMENT ME!private intfuncEvalinteger scalar containing the total number of function evaluations done inside this routine.private double[]g1D array of length param containing the gradient of the objective at the current point.private intGAUSSIANprivate double[][]gmatparam by param array If secondAllowed if false, gmat can be used as a singly subscripted array of dimension param by setting all second indices to 0.private booleangndokDOCUMENT ME!private doublegnormscalar containing norm of the gradient divided by norm of Jacobian.protected double[]guesDOCUMENT ME!private intGULF_RESEARCH_AND_DEVELOPMENTprivate intHATFLDBprivate intHATFLDCprivate intHELICAL_VALLEYprivate intHOCK1private intHOCK21_MODIFIEDprivate intHOCK25private intHOCK3private intHOCK4private inticountVariables used for restart information.private intievDOCUMENT ME!private intifreeDOCUMENT ME!private intimaxVariables used for restart information.private intindicDOCUMENT ME!private intinfoConsistently use 1 base indexing rather than 0 based indexingprotected booleaninternalScalingIf true, the columns of the Jacobian are scaled to have unit length.private intirankVariables used for restart information.protected intitersinteger scalar containing the number of iterations until termination.private intitotalVariables used for restart information.private intivalVariables used for restart information.protected double[][]jacobian2D array of doubles of dimension nPts by max(4,param) containing the main part of the covariance matrix (Jtranspose * J)inverse, where J is the Jacobian matrix computed at a.private intjacobianEvalinteger scalar containing the number of function evaluations caused by computing Jacobians with difference methods.private intJENNRICH_AND_SAMPSONprivate intkodDOCUMENT ME!private intkodkm1The suffices km2 and km1 in the names of the variables represent time step k-2 and k-1 respectively.private intkodkm2The suffices km2 and km1 in the names of the variables represent time step k-2 and k-1 respectively.private intKOWALIK_AND_OSBORNEprivate intlattryVariables used for restart information.private intLEVMAR_ROSENBROCKprivate intLINEAR_FULL_RANKprivate intLINEAR_RANK1private intLINEAR_RANK1_WITH_ZERO_COLUMNS_AND_ROWSprivate intlineEvalinteger scalar containing the number of function evaluations caused by the linesearch algorithm.private intMADSENprotected intmaxIterationsDOCUMENT ME!private intmdgLeading dimension of array gmat mdg must be >= param if secondAllowed is true.private intMEYERprivate intMODIFIED_ROSENBROCKprivate doublenoiseDOCUMENT ME!protected intnPtsinteger scalar containing the number of data points.private intOSBORNE1private intOSBORNE2protected booleanoutputMesprivate doublep1sqrtem5protected intparamvariables integer scalar containing the number of unknowns.protected doubleparameterConvergenceparameter convergence constant Used to test for convergence by the relative change in a[] being less than the parameterConvergence.private intPENALTY_FUNCTION_Iprivate intPENALTY_FUNCTION_IIprivate doublepgb1DOCUMENT ME!private doublepgb2DOCUMENT ME!private doublephidouble scalar containging the value of the objective function = (0.5 * chisquare) at the termination point a.private doublephikp1DOCUMENT ME!private doublephilatDOCUMENT ME!private int[]pivitarray of integers of dimension param containing the permutation matrix E in the decomposition QTranspose * J * D E = (R) (0) pivit[i] contains the index of the column that was moved into column i.private doublepMinrmDOCUMENT ME!private intPOWELL_2_PARAMETERprivate intPOWELL_BADLY_SCALEDprivate intPOWELL_SINGULARprivate doublepredbDOCUMENT ME!private doubleprekm1scalar containing the predicted reduction in the objective if pseudoRank from previous step is used.private doubleqMinrmDOCUMENT ME!private doublerabsDOCUMENT ME!protected doublerelativeConvergencerelative convergence constant Used to test for convergence by reduction in objective function being less than relativeConvergence squared.protected double[]residuals1D array of doubles of dimension nPts containing the value of the residuals at the termination point a;.private booleanrestartDOCUMENT ME!private doublerlenbDOCUMENT ME!private doublerminDOCUMENT ME!private intrngkm1The suffices km2 and km1 in the names of the variables represent time step k-2 and k-1 respectively.private doublerootspDOCUMENT ME!private intROSENBROCKprivate doublescv0v1DOCUMENT ME!private doublescv0v2DOCUMENT ME!private doublescv1v2DOCUMENT ME!private intsecindDOCUMENT ME!protected booleansecondAllowedThe method of Newton is allowed at the end of the iteration in some situations (large residuals).private intsecondEvalinteger scalar containing the number of function evaluations caused by using second derivatives in the method of Newton.private doublesmaxDOCUMENT ME!private doublesnDOCUMENT ME!private doublespeeddouble scalar containing an estimate of the linear convergence factor.private doublesqrt10private doublesqrt5private doublesqrtem5private doublesrelprsingle relative precision.protected doublestdvDOCUMENT ME!private doublestepbDOCUMENT ME!private inttestCaseprivate booleantestModeprotected doubletolerancepseudo rank tolerance constant used to determine the pseudo rank of the Jacobian J.private intTRIGONOMETRICprivate double[]v1D array of length nPts containing the orthogonal projection of residuals onto space spanned by the first pseudoRank linear independent columns of the Jacobian.private doublev0normDOCUMENT ME!private doublev1normDOCUMENT ME!private doublev2normDOCUMENT ME!private intVARIABLY_DIMENSIONED_FUNCTIONprivate double[]w0DOCUMENT ME!private double[]w1DOCUMENT ME!private double[]w2DOCUMENT ME!private double[]w3DOCUMENT ME!private intWATSONprivate intWOODprivate doublex1MinrmDOCUMENT ME!private doublex2MinrmDOCUMENT ME!private doublex3MinrmDOCUMENT ME!private double[]xSeriesDOCUMENT ME!private double[]ySeriesDOCUMENT ME!
-
Constructor Summary
Constructors Constructor Description NLConstrainedEngine()NLConstrainedEngine(int nPts, int param)NLConstrainedEngine - non-linear fit to a function.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private voidanaluc(int[] prank)DOCUMENT ME!private voidbtrunc(int[] prank, boolean internalScaling, double[] work)DOCUMENT ME!private voidchder(double dphize, int[] k, double[] alfk, double[] phik)DOCUMENT ME!private voidchoose(double xmin, double[] v2, double[] root1, double[] root2, double[] proot2)DOCUMENT ME!private voidcovar()DOCUMENT ME!private voiddimsub(int[] prank, int[] rank)DOCUMENT ME!private doublednrm2(int n, double[] x, int incx)DOCUMENT ME!voiddriver()driver.private voiddriverCalls()voiddumpTestResults()private voidevreuc(int[] prank)DOCUMENT ME!private voidfitTestModel()Creates a new Fit24DModel object.abstract voidfitToFunction(double[] a, double[] residuals, double[][] jacobian)fitToFunction communicates with 3 protected variables param, nPts, and ctrlMat ctrlMat is used as a wrapper for ctrl or lctrl.voidfitToTestFunction(double[] a, double[] residuals, double[][] jacobian)private voidfsumsq(double alfk, double[] xnew, double[] fnew, double[] fn_val, int[] ctrl)DOCUMENT ME!private voidgauc(int[] k, double alfmin, double[] gmod, double dphize, double[] u, double[] phiu, double tau, double pmax)DOCUMENT ME!doublegetChiSquared()getChiSquared - accessor to chi-squared value (goodness-of-fit measure).intgetExitStatus()intgetIterations()double[]getParameters()getParameters accessor to function parameters.double[]getResiduals()DOCUMENT ME!private voidgnavuc()DOCUMENT ME!private doublegndunc(boolean internalScaling, int[] prank, double[] work)DOCUMENT ME!private voidhess()DOCUMENT ME!private voidjacdif(int[] ctrl)DOCUMENT ME!private voidjtrj(int nn)DOCUMENT ME!private voidlineuc(double[] gmod, double dphize, double alplow)DOCUMENT ME!private voidlinuc2(double[] fnew, double alfk, double[] v2)DOCUMENT ME!private voidlsunc()DOCUMENT ME!private voidminrm(double[] v2, double alfmin, double alfmax, double xmin, double[] x, double[] px, double[] y, double[] py)DOCUMENT ME!private voidminrm1(double[] v2)DOCUMENT ME!private voidminrm2()DOCUMENT ME!private voidminrn(double x, double fx, double w, double fw, double v, double fv, double alfmin, double alfmax, double pmax, double[] u, double[] pu)DOCUMENT ME!private voidnewunc()DOCUMENT ME!private voidoner(double[] x)DOCUMENT ME!private voidoutuc()DOCUMENT ME!private voidpivec(double[] work)DOCUMENT ME!private doublepol3(double x)DOCUMENT ME!private doublepol4(double[] v2, double x)DOCUMENT ME!private voidpregn(double[] work, int mindim, int[] prank, int[] dim)DOCUMENT ME!private voidpresub(double[] work, int[] prank, int[] rank)DOCUMENT ME!private voidquamin(double x, double fx, double w, double fw, double v, double fv, double[] u)DOCUMENT ME!private voidreavuc()DOCUMENT ME!private voidreduc(double[] alf, double[] phialf, double alfk, double pk, double diff, double eta, double[] gmod, double[] fnew, int[] k, double[] phik, boolean[] reduce)DOCUMENT ME!private voidreleps()DOCUMENT ME!private voidrtrw1(int nn)DOCUMENT ME!private voidscalv(double[] v, double factor, int n)DOCUMENT ME!private voidscaunc()DOCUMENT ME!private voidschdc(int nn, int[] jpvt, int job)DOCUMENT ME!private voidsecuc()DOCUMENT ME!private doubleshiftedChebyshev(double x, int n)private doubleshiftedChebyshevDerivative(double x, int n)private voidsoliuc(double tau, int[] prank)DOCUMENT ME!private voidsposl(int nn)DOCUMENT ME!private voidsqrdc(double[][] x, int n, int p, double[] qraux, int[] jpvt, int job)DOCUMENT ME!private voidsqrsl(double[][] x, int n, int k, double[] qraux, double[] y, double[] qy, double[] qty, double[] b, double[] rsd, double[] xb, int job)DOCUMENT ME!voidstatusMessage(int status)private voidstepuc(int[] prank)DOCUMENT ME!private voidstrsl(int[] prank, double[] b)DOCUMENT ME!private voidsubuc(int[] prank, int[] rank)DOCUMENT ME!private voidtermuc(int[] prank, double aNorm)DOCUMENT ME!private voidtriunc(double tol, int constraintAct, int[] prank)DOCUMENT ME!private voidtwor()DOCUMENT ME!
-
-
-
Field Detail
-
big
private static final double big
DOCUMENT ME!- See Also:
- Constant Field Values
-
a
protected double[] a
On completion if exitStatus >= 0 a[] contains the latest (best) estimate of the solution point.
-
absoluteConvergence
protected double absoluteConvergence
absolute convergence constant Used to test for convergence by the sum of squares being less than the absoluteConvergence squared.
-
bl
protected double[] bl
DOCUMENT ME!
-
bounds
protected int bounds
integer scalar code for assessing the bounds bounds = 0 means an unconstrained problem bounds = 1 means the same lower bounds for all unknowns and the same upper bounds for all unknowns. The lower and upper bound must be stored in bl[0] and bu[0] respectively. bounds = 2 means that the bounds must be supplied by the user in bl[i] and bu[i] for i = 0,1, param - 1.
-
bu
protected double[] bu
DOCUMENT ME!
-
jacobian
protected double[][] jacobian
2D array of doubles of dimension nPts by max(4,param) containing the main part of the covariance matrix (Jtranspose * J)inverse, where J is the Jacobian matrix computed at a.
-
ctrlMat
protected int[] ctrlMat
Wrapper for ctrl or lctrl communication with driver.
-
dyda
protected double[] dyda
DOCUMENT ME!
-
stdv
protected double stdv
DOCUMENT ME!
-
gues
protected double[] gues
DOCUMENT ME!
-
internalScaling
protected boolean internalScaling
If true, the columns of the Jacobian are scaled to have unit length. If false, internal scaling is not used to compute the Gauss-Newton search direction.
-
iters
protected int iters
integer scalar containing the number of iterations until termination.
-
maxIterations
protected int maxIterations
DOCUMENT ME!
-
nPts
protected int nPts
integer scalar containing the number of data points.
-
param
protected int param
variables integer scalar containing the number of unknowns.
-
parameterConvergence
protected double parameterConvergence
parameter convergence constant Used to test for convergence by the relative change in a[] being less than the parameterConvergence.
-
relativeConvergence
protected double relativeConvergence
relative convergence constant Used to test for convergence by reduction in objective function being less than relativeConvergence squared.
-
residuals
protected double[] residuals
1D array of doubles of dimension nPts containing the value of the residuals at the termination point a;.
-
secondAllowed
protected boolean secondAllowed
The method of Newton is allowed at the end of the iteration in some situations (large residuals). If true, the use of second derivatives is permitted
-
tolerance
protected double tolerance
pseudo rank tolerance constant used to determine the pseudo rank of the Jacobian J.
-
xSeries
private double[] xSeries
DOCUMENT ME!
-
ySeries
private double[] ySeries
DOCUMENT ME!
-
aDiff
private double aDiff
DOCUMENT ME!
-
alfnoi
private double alfnoi
DOCUMENT ME!
-
alpha
private double alpha
DOCUMENT ME!
-
alphup
private double alphup
DOCUMENT ME!
-
aset
private int[] aset
1D integer array of length param containing a code which indicates whether an unknown is active or not aset[i] = 0 when a[i] is free = +1 when a[i] == bl[i] = -1 when a[i] == bu[i].
-
beta
private double beta
scalar containing the norm of the orthogonal projection of residuals onto the space spanned by the columns of the Jacobian.
-
betkm2
private double betkm2
DOCUMENT ME!
-
alfkm2
private double alfkm2
DOCUMENT ME!
-
betkm1
private double betkm1
DOCUMENT ME!
-
d1km1
private double d1km1
DOCUMENT ME!
-
fsqkm1
private double fsqkm1
DOCUMENT ME!
-
dxnkm1
private double dxnkm1
DOCUMENT ME!
-
alfkm1
private double alfkm1
DOCUMENT ME!
-
aupkm1
private double aupkm1
DOCUMENT ME!
-
bn
private double bn
DOCUMENT ME!
-
cnorm
private double cnorm
DOCUMENT ME!
-
ctrl
private int ctrl
ctrl can have 3 different values on entry. If ctrl = 1 or ctrl = -1, compute the residuals for all nPts at a certain point a and return the residuals = yfit - yseries in the array residuals if the functions are computable. If not successful and ctrl was set to 1, set ctrl = -1. If not successful and ctrl was set to -1, set ctrl < -10. If ctrl = 2 and the Jacobian is supplied analytically, calculate the Jacobian = Jij = dymodi/daj. The Jacobian is placed in matrix jacobian. If the Jacobian cannot be calculated, set ctrl < -10. If you wish to compute the Jacobian numerically on return, set ctrl = 0.
-
d1sqs
private double d1sqs
scalar containing the predicted reduction in the objective function if gn-direction is used.
-
diag
private double[] diag
1D double array of length param conatiaing the diagonal elements of the diagonal matrix D if internalScaling is true. Otherwise, undefined.
-
dx
private double[] dx
double working areas 1D array of length param containing the solution of J * dx = -residuals.
-
dxnorm
private double dxnorm
DOCUMENT ME!
-
eps
private double eps
DOCUMENT ME!
-
epsl
private double epsl
DOCUMENT ME!
-
errorStatus
private int errorStatus
DOCUMENT ME!
-
eval
private int eval
DOCUMENT ME!
-
exitStatus
private int exitStatus
integer scalar that indicates why the return was taken. If exitStatus != -1 and exitStatus >= -10, then a[] contains the latest (best) estimate of the solution point. = 1000X convergence because relative predicted reduction in the objective function = (0.5 * chisquare) is less than (relativeConvergence)**2 = 200X convergence because sum of squares is less than (absoluteConvergence)**2 = 30X convergence because the relative change in a is less than parameterConvergence = 4X convergence because we are computing at noise level X, the last digit in the convergence code, indicates how the last steps were computed X = 0 no trouble (Gauss-Newton the last 3 steps) = 1 pseudoRank <> param at termination point = 2 The method of Newton was used (at least) in the last step = 3 The (last - 2) step was subspace minimization, but the last 2 steps were Gauss-Newton steps = 4 The steplength was not unit in both the last 2 steps < 0 indicates that no convergence criterion is fulfilled, but some abnormal termination criterion is satisfied = -1 Invalid starting condition: nPts < param or param <= 0 or nPts <= 0 or maxIterations <= 0 or relativeConvergence < 0 or relativeConvergence < 0 or absoluteConvergence < 0 or tolerance <= 0 or parameterConvergence < 0 or invalid starting point on entry = -2 Number of iterations has exceeded maximum allowed iterations = -3 The Hessian emanating from the second order method is not positive definite = -4 The algorithm would like to use second derivatives but is not allowed to do that = -5 An undamped step with Newton's method is a failure = -6 The latest search direction computed using subspace minimization was not a descent direction (probably caused by wrongly computed Jacobian) = -7 There is only one feasible point, name a[i] = bl[i] = bu[i]; i = 0,1,...,param-1 < -10 Termination due to user stop indicator
-
fsum
private double fsum
DOCUMENT ME!
-
funcEval
private int funcEval
integer scalar containing the total number of function evaluations done inside this routine.
-
g
private double[] g
1D array of length param containing the gradient of the objective at the current point.
-
gmat
private double[][] gmat
param by param array If secondAllowed if false, gmat can be used as a singly subscripted array of dimension param by setting all second indices to 0.
-
gndok
private boolean gndok
DOCUMENT ME!
-
gnorm
private double gnorm
scalar containing norm of the gradient divided by norm of Jacobian.
-
icount
private int icount
Variables used for restart information.
-
lattry
private int lattry
Variables used for restart information.
-
itotal
private int itotal
Variables used for restart information.
-
irank
private int irank
Variables used for restart information.
-
imax
private int imax
Variables used for restart information.
-
ival
private int ival
Variables used for restart information.
-
iev
private int iev
DOCUMENT ME!
-
ifree
private int ifree
DOCUMENT ME!
-
indic
private int indic
DOCUMENT ME!
-
info
private int info
Consistently use 1 base indexing rather than 0 based indexing
-
jacobianEval
private int jacobianEval
integer scalar containing the number of function evaluations caused by computing Jacobians with difference methods.
-
kod
private int kod
DOCUMENT ME!
-
lineEval
private int lineEval
integer scalar containing the number of function evaluations caused by the linesearch algorithm.
-
mdg
private int mdg
Leading dimension of array gmat mdg must be >= param if secondAllowed is true.
-
noise
private double noise
DOCUMENT ME!
-
constraintAct
private int constraintAct
Number of active constraints.
-
pgb1
private double pgb1
DOCUMENT ME!
-
pgb2
private double pgb2
DOCUMENT ME!
-
phi
private double phi
double scalar containging the value of the objective function = (0.5 * chisquare) at the termination point a.
-
phikp1
private double phikp1
DOCUMENT ME!
-
philat
private double philat
DOCUMENT ME!
-
bestpg
private double bestpg
DOCUMENT ME!
-
pivit
private int[] pivit
array of integers of dimension param containing the permutation matrix E in the decomposition QTranspose * J * D E = (R) (0) pivit[i] contains the index of the column that was moved into column i.
-
pMinrm
private double pMinrm
DOCUMENT ME!
-
qMinrm
private double qMinrm
DOCUMENT ME!
-
deltaMinrm
private double deltaMinrm
DOCUMENT ME!
-
a1div3
private double a1div3
DOCUMENT ME!
-
predb
private double predb
DOCUMENT ME!
-
prekm1
private double prekm1
scalar containing the predicted reduction in the objective if pseudoRank from previous step is used.
-
rabs
private double rabs
DOCUMENT ME!
-
restart
private boolean restart
DOCUMENT ME!
-
rlenb
private double rlenb
DOCUMENT ME!
-
rmin
private double rmin
DOCUMENT ME!
-
kodkm2
private int kodkm2
The suffices km2 and km1 in the names of the variables represent time step k-2 and k-1 respectively. These variables are updated only inside the routine evreuc.
-
rngkm1
private int rngkm1
The suffices km2 and km1 in the names of the variables represent time step k-2 and k-1 respectively. These variables are updated only inside the routine evreuc.
-
kodkm1
private int kodkm1
The suffices km2 and km1 in the names of the variables represent time step k-2 and k-1 respectively. These variables are updated only inside the routine evreuc.
-
rootsp
private double rootsp
DOCUMENT ME!
-
bl0
private double bl0
DOCUMENT ME!
-
bu0
private double bu0
DOCUMENT ME!
-
secind
private int secind
DOCUMENT ME!
-
secondEval
private int secondEval
integer scalar containing the number of function evaluations caused by using second derivatives in the method of Newton.
-
smax
private double smax
DOCUMENT ME!
-
sn
private double sn
DOCUMENT ME!
-
speed
private double speed
double scalar containing an estimate of the linear convergence factor.
-
srelpr
private double srelpr
single relative precision.
-
stepb
private double stepb
DOCUMENT ME!
-
v
private double[] v
1D array of length nPts containing the orthogonal projection of residuals onto space spanned by the first pseudoRank linear independent columns of the Jacobian.
-
v0norm
private double v0norm
DOCUMENT ME!
-
v1norm
private double v1norm
DOCUMENT ME!
-
v2norm
private double v2norm
DOCUMENT ME!
-
scv0v1
private double scv0v1
DOCUMENT ME!
-
scv0v2
private double scv0v2
DOCUMENT ME!
-
scv1v2
private double scv1v2
DOCUMENT ME!
-
w0
private double[] w0
DOCUMENT ME!
-
w1
private double[] w1
DOCUMENT ME!
-
w2
private double[] w2
DOCUMENT ME!
-
w3
private double[] w3
DOCUMENT ME!
-
x1Minrm
private double x1Minrm
DOCUMENT ME!
-
x2Minrm
private double x2Minrm
DOCUMENT ME!
-
x3Minrm
private double x3Minrm
DOCUMENT ME!
-
sqrtem5
private double sqrtem5
-
p1sqrtem5
private double p1sqrtem5
-
exp0p1
private double exp0p1
-
sqrt5
private double sqrt5
-
sqrt10
private double sqrt10
-
expap1
private double[] expap1
-
outputMes
protected boolean outputMes
-
testMode
private boolean testMode
-
analyticalJacobian
protected boolean analyticalJacobian
-
testCase
private int testCase
-
DRAPER24D
private final int DRAPER24D
- See Also:
- Constant Field Values
-
ROSENBROCK
private final int ROSENBROCK
- See Also:
- Constant Field Values
-
FREUDENSTEIN_AND_ROTH
private final int FREUDENSTEIN_AND_ROTH
- See Also:
- Constant Field Values
-
POWELL_BADLY_SCALED
private final int POWELL_BADLY_SCALED
- See Also:
- Constant Field Values
-
BROWN_BADLY_SCALED
private final int BROWN_BADLY_SCALED
- See Also:
- Constant Field Values
-
BEALE
private final int BEALE
- See Also:
- Constant Field Values
-
JENNRICH_AND_SAMPSON
private final int JENNRICH_AND_SAMPSON
- See Also:
- Constant Field Values
-
HELICAL_VALLEY
private final int HELICAL_VALLEY
- See Also:
- Constant Field Values
-
GAUSSIAN
private final int GAUSSIAN
- See Also:
- Constant Field Values
-
BARD
private final int BARD
- See Also:
- Constant Field Values
-
MEYER
private final int MEYER
- See Also:
- Constant Field Values
-
GULF_RESEARCH_AND_DEVELOPMENT
private final int GULF_RESEARCH_AND_DEVELOPMENT
- See Also:
- Constant Field Values
-
BOX_3D
private final int BOX_3D
- See Also:
- Constant Field Values
-
POWELL_SINGULAR
private final int POWELL_SINGULAR
- See Also:
- Constant Field Values
-
WOOD
private final int WOOD
- See Also:
- Constant Field Values
-
KOWALIK_AND_OSBORNE
private final int KOWALIK_AND_OSBORNE
- See Also:
- Constant Field Values
-
BROWN_AND_DENNIS
private final int BROWN_AND_DENNIS
- See Also:
- Constant Field Values
-
OSBORNE1
private final int OSBORNE1
- See Also:
- Constant Field Values
-
BIGGS_EXP6
private final int BIGGS_EXP6
- See Also:
- Constant Field Values
-
OSBORNE2
private final int OSBORNE2
- See Also:
- Constant Field Values
-
WATSON
private final int WATSON
- See Also:
- Constant Field Values
-
EXTENDED_ROSENBROCK
private final int EXTENDED_ROSENBROCK
- See Also:
- Constant Field Values
-
EXTENDED_POWELL_SINGULAR
private final int EXTENDED_POWELL_SINGULAR
- See Also:
- Constant Field Values
-
PENALTY_FUNCTION_I
private final int PENALTY_FUNCTION_I
- See Also:
- Constant Field Values
-
PENALTY_FUNCTION_II
private final int PENALTY_FUNCTION_II
- See Also:
- Constant Field Values
-
VARIABLY_DIMENSIONED_FUNCTION
private final int VARIABLY_DIMENSIONED_FUNCTION
- See Also:
- Constant Field Values
-
TRIGONOMETRIC
private final int TRIGONOMETRIC
- See Also:
- Constant Field Values
-
BROWN_ALMOST_LINEAR
private final int BROWN_ALMOST_LINEAR
- See Also:
- Constant Field Values
-
DISCRETE_BOUNDARY_VALUE
private final int DISCRETE_BOUNDARY_VALUE
- See Also:
- Constant Field Values
-
DISCRETE_INTEGRAL
private final int DISCRETE_INTEGRAL
- See Also:
- Constant Field Values
-
BROYDEN_TRIDIAGONAL
private final int BROYDEN_TRIDIAGONAL
- See Also:
- Constant Field Values
-
BROYDEN_BANDED
private final int BROYDEN_BANDED
- See Also:
- Constant Field Values
-
LINEAR_FULL_RANK
private final int LINEAR_FULL_RANK
- See Also:
- Constant Field Values
-
LINEAR_RANK1
private final int LINEAR_RANK1
- See Also:
- Constant Field Values
-
LINEAR_RANK1_WITH_ZERO_COLUMNS_AND_ROWS
private final int LINEAR_RANK1_WITH_ZERO_COLUMNS_AND_ROWS
- See Also:
- Constant Field Values
-
CHEBYQUAD
private final int CHEBYQUAD
- See Also:
- Constant Field Values
-
HOCK25
private final int HOCK25
- See Also:
- Constant Field Values
-
LEVMAR_ROSENBROCK
private final int LEVMAR_ROSENBROCK
- See Also:
- Constant Field Values
-
MODIFIED_ROSENBROCK
private final int MODIFIED_ROSENBROCK
- See Also:
- Constant Field Values
-
POWELL_2_PARAMETER
private final int POWELL_2_PARAMETER
- See Also:
- Constant Field Values
-
HOCK1
private final int HOCK1
- See Also:
- Constant Field Values
-
HOCK21_MODIFIED
private final int HOCK21_MODIFIED
- See Also:
- Constant Field Values
-
HATFLDB
private final int HATFLDB
- See Also:
- Constant Field Values
-
HATFLDC
private final int HATFLDC
- See Also:
- Constant Field Values
-
EQUILIBRIUM_COMBUSTION
private final int EQUILIBRIUM_COMBUSTION
- See Also:
- Constant Field Values
-
MADSEN
private final int MADSEN
- See Also:
- Constant Field Values
-
HOCK3
private final int HOCK3
- See Also:
- Constant Field Values
-
HOCK4
private final int HOCK4
- See Also:
- Constant Field Values
-
CERES_CURVE_FITTING
private final int CERES_CURVE_FITTING
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NLConstrainedEngine
public NLConstrainedEngine()
-
NLConstrainedEngine
public NLConstrainedEngine(int nPts, int param)NLConstrainedEngine - non-linear fit to a function.- Parameters:
nPts- number of points to fit to the function toparam- number of parameters of functionxSeries- DOCUMENT ME!yData- DOCUMENT ME!
-
-
Method Detail
-
fitTestModel
private void fitTestModel()
Creates a new Fit24DModel object.- Parameters:
nPoints- DOCUMENT ME!xData- DOCUMENT ME!yData- DOCUMENT ME!initial- DOCUMENT ME!
-
fitToTestFunction
public void fitToTestFunction(double[] a, double[] residuals, double[][] jacobian)
-
shiftedChebyshev
private double shiftedChebyshev(double x, int n)
-
shiftedChebyshevDerivative
private double shiftedChebyshevDerivative(double x, int n)
-
dumpTestResults
public void dumpTestResults()
-
driverCalls
private void driverCalls()
-
fitToFunction
public abstract void fitToFunction(double[] a, double[] residuals, double[][] jacobian)fitToFunction communicates with 3 protected variables param, nPts, and ctrlMat ctrlMat is used as a wrapper for ctrl or lctrl. Evaluates the residuals or the Jacobian at a certain a[]- Parameters:
a- DOCUMENT ME!residuals- DOCUMENT ME!jacobian- DOCUMENT ME!
-
driver
public void driver()
driver.
-
getChiSquared
public double getChiSquared()
getChiSquared - accessor to chi-squared value (goodness-of-fit measure).- Returns:
- the value of chi squared
-
getIterations
public int getIterations()
-
getParameters
public double[] getParameters()
getParameters accessor to function parameters.- Returns:
- the function parameters determined by the algorithm
-
getResiduals
public double[] getResiduals()
DOCUMENT ME!- Returns:
- double[] residuals
-
getExitStatus
public int getExitStatus()
-
statusMessage
public void statusMessage(int status)
-
analuc
private void analuc(int[] prank)
DOCUMENT ME!
-
btrunc
private void btrunc(int[] prank, boolean internalScaling, double[] work)DOCUMENT ME!- Parameters:
internalScaling- DOCUMENT ME!work- DOCUMENT ME!
-
chder
private void chder(double dphize, int[] k, double[] alfk, double[] phik)DOCUMENT ME!- Parameters:
dphize- DOCUMENT ME!
-
choose
private void choose(double xmin, double[] v2, double[] root1, double[] root2, double[] proot2)DOCUMENT ME!- Parameters:
xmin- DOCUMENT ME!v2- DOCUMENT ME!
-
covar
private void covar()
DOCUMENT ME!
-
dimsub
private void dimsub(int[] prank, int[] rank)DOCUMENT ME!
-
dnrm2
private double dnrm2(int n, double[] x, int incx)DOCUMENT ME!- Parameters:
n- DOCUMENT ME!x- DOCUMENT ME!incx- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
evreuc
private void evreuc(int[] prank)
DOCUMENT ME!
-
fsumsq
private void fsumsq(double alfk, double[] xnew, double[] fnew, double[] fn_val, int[] ctrl)DOCUMENT ME!- Parameters:
alfk- DOCUMENT ME!xnew- DOCUMENT ME!fnew- DOCUMENT ME!phiMat- DOCUMENT ME!
-
gauc
private void gauc(int[] k, double alfmin, double[] gmod, double dphize, double[] u, double[] phiu, double tau, double pmax)DOCUMENT ME!- Parameters:
gmod- DOCUMENT ME!dphize- DOCUMENT ME!tau- DOCUMENT ME!pmax- DOCUMENT ME!
-
gnavuc
private void gnavuc()
DOCUMENT ME!
-
gndunc
private double gndunc(boolean internalScaling, int[] prank, double[] work)DOCUMENT ME!- Parameters:
internalScaling- DOCUMENT ME!pseudoRankMat- DOCUMENT ME!work- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
hess
private void hess()
DOCUMENT ME!
-
jacdif
private void jacdif(int[] ctrl)
DOCUMENT ME!
-
jtrj
private void jtrj(int nn)
DOCUMENT ME!- Parameters:
nn- DOCUMENT ME!
-
lineuc
private void lineuc(double[] gmod, double dphize, double alplow)DOCUMENT ME!- Parameters:
gmod- DOCUMENT ME!dphize- DOCUMENT ME!alplow- DOCUMENT ME!
-
linuc2
private void linuc2(double[] fnew, double alfk, double[] v2)DOCUMENT ME!- Parameters:
fnew- DOCUMENT ME!v2- DOCUMENT ME!
-
lsunc
private void lsunc()
DOCUMENT ME!
-
minrm
private void minrm(double[] v2, double alfmin, double alfmax, double xmin, double[] x, double[] px, double[] y, double[] py)DOCUMENT ME!- Parameters:
v2- DOCUMENT ME!xmin- DOCUMENT ME!
-
minrm1
private void minrm1(double[] v2)
DOCUMENT ME!- Parameters:
v2- DOCUMENT ME!
-
minrm2
private void minrm2()
DOCUMENT ME!
-
minrn
private void minrn(double x, double fx, double w, double fw, double v, double fv, double alfmin, double alfmax, double pmax, double[] u, double[] pu)DOCUMENT ME!- Parameters:
phikm2- DOCUMENT ME!pmax- DOCUMENT ME!
-
newunc
private void newunc()
DOCUMENT ME!
-
oner
private void oner(double[] x)
DOCUMENT ME!
-
outuc
private void outuc()
DOCUMENT ME!
-
pivec
private void pivec(double[] work)
DOCUMENT ME!- Parameters:
work- DOCUMENT ME!
-
pol3
private double pol3(double x)
DOCUMENT ME!- Parameters:
x- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
pol4
private double pol4(double[] v2, double x)DOCUMENT ME!- Parameters:
v2- DOCUMENT ME!x- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
pregn
private void pregn(double[] work, int mindim, int[] prank, int[] dim)DOCUMENT ME!- Parameters:
work- DOCUMENT ME!mindim- DOCUMENT ME!
-
presub
private void presub(double[] work, int[] prank, int[] rank)DOCUMENT ME!- Parameters:
work- DOCUMENT ME!
-
quamin
private void quamin(double x, double fx, double w, double fw, double v, double fv, double[] u)DOCUMENT ME!- Parameters:
phikm2- DOCUMENT ME!
-
reavuc
private void reavuc()
DOCUMENT ME!
-
reduc
private void reduc(double[] alf, double[] phialf, double alfk, double pk, double diff, double eta, double[] gmod, double[] fnew, int[] k, double[] phik, boolean[] reduce)DOCUMENT ME!- Parameters:
pk- DOCUMENT ME!eta- DOCUMENT ME!gmod- DOCUMENT ME!fnew- DOCUMENT ME!
-
releps
private void releps()
DOCUMENT ME!
-
rtrw1
private void rtrw1(int nn)
DOCUMENT ME!- Parameters:
nn- DOCUMENT ME!
-
scalv
private void scalv(double[] v, double factor, int n)DOCUMENT ME!- Parameters:
v- DOCUMENT ME!factor- DOCUMENT ME!n- DOCUMENT ME!
-
scaunc
private void scaunc()
DOCUMENT ME!
-
schdc
private void schdc(int nn, int[] jpvt, int job)DOCUMENT ME!- Parameters:
nn- DOCUMENT ME!jpvt- DOCUMENT ME!job- DOCUMENT ME!
-
secuc
private void secuc()
DOCUMENT ME!
-
soliuc
private void soliuc(double tau, int[] prank)DOCUMENT ME!- Parameters:
tau- DOCUMENT ME!
-
sposl
private void sposl(int nn)
DOCUMENT ME!- Parameters:
nn- DOCUMENT ME!
-
sqrdc
private void sqrdc(double[][] x, int n, int p, double[] qraux, int[] jpvt, int job)DOCUMENT ME!- Parameters:
x- DOCUMENT ME!n- DOCUMENT ME!p- DOCUMENT ME!qraux- DOCUMENT ME!jpvt- DOCUMENT ME!job- DOCUMENT ME!
-
sqrsl
private void sqrsl(double[][] x, int n, int k, double[] qraux, double[] y, double[] qy, double[] qty, double[] b, double[] rsd, double[] xb, int job)DOCUMENT ME!- Parameters:
x- DOCUMENT ME!n- DOCUMENT ME!k- DOCUMENT ME!qraux- DOCUMENT ME!y- DOCUMENT ME!qy- DOCUMENT ME!qty- DOCUMENT ME!b- DOCUMENT ME!rsd- DOCUMENT ME!xb- DOCUMENT ME!job- DOCUMENT ME!
-
stepuc
private void stepuc(int[] prank)
DOCUMENT ME!
-
strsl
private void strsl(int[] prank, double[] b)DOCUMENT ME!- Parameters:
b- DOCUMENT ME!
-
subuc
private void subuc(int[] prank, int[] rank)DOCUMENT ME!
-
termuc
private void termuc(int[] prank, double aNorm)DOCUMENT ME!- Parameters:
aNorm- DOCUMENT ME!
-
triunc
private void triunc(double tol, int constraintAct, int[] prank)DOCUMENT ME!- Parameters:
tol- DOCUMENT ME!constraintAct- DOCUMENT ME!
-
twor
private void twor()
DOCUMENT ME!
-
-