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
Display results of displaying exponential fitting parameters.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected double[]On completion if exitStatus >= 0 a[] contains the latest (best) estimate of the solution point.private doubleDOCUMENT ME!protected doubleabsolute convergence constant Used to test for convergence by the sum of squares being less than the absoluteConvergence squared.private doubleDOCUMENT ME!private doubleDOCUMENT ME!private doubleDOCUMENT ME!private doubleDOCUMENT ME!private doubleDOCUMENT ME!private doubleDOCUMENT ME!protected booleanprivate int[]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].private doubleDOCUMENT ME!private final intprivate final intprivate doubleDOCUMENT ME!private doublescalar containing the norm of the orthogonal projection of residuals onto the space spanned by the columns of the Jacobian.private doubleDOCUMENT ME!private doubleDOCUMENT ME!private static final doubleDOCUMENT ME!private final intprotected double[]DOCUMENT ME!private doubleDOCUMENT ME!private doubleDOCUMENT ME!protected intinteger 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 final intprivate final intprivate final intprivate final intprivate final intprivate final intprotected double[]DOCUMENT ME!private doubleDOCUMENT ME!private final intprivate final intprivate doubleDOCUMENT ME!private intNumber of active constraints.private intctrl can have 3 different values on entry.protected int[]Wrapper for ctrl or lctrl communication with driver.private doubleDOCUMENT ME!private doublescalar containing the predicted reduction in the objective function if gn-direction is used.private doubleDOCUMENT ME!private double[]1D double array of length param conatiaing the diagonal elements of the diagonal matrix D if internalScaling is true.private final intprivate final intprivate final intprivate double[]double working areas 1D array of length param containing the solution of J * dx = -residuals.private doubleDOCUMENT ME!private doubleDOCUMENT ME!protected double[]DOCUMENT ME!private doubleDOCUMENT ME!private doubleDOCUMENT ME!private final intprivate intDOCUMENT ME!private intDOCUMENT ME!private intinteger scalar that indicates why the return was taken.private doubleprivate double[]private final intprivate final intprivate final intprivate doubleDOCUMENT ME!private doubleDOCUMENT ME!private intinteger scalar containing the total number of function evaluations done inside this routine.private double[]1D array of length param containing the gradient of the objective at the current point.private final intprivate double[][]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.private booleanDOCUMENT ME!private doublescalar containing norm of the gradient divided by norm of Jacobian.protected double[]DOCUMENT ME!private final intprivate final intprivate final intprivate final intprivate final intprivate final intprivate final intprivate final intprivate final intprivate intVariables used for restart information.private intDOCUMENT ME!private intDOCUMENT ME!private intVariables used for restart information.private intDOCUMENT ME!private intConsistently use 1 base indexing rather than 0 based indexingprotected booleanIf true, the columns of the Jacobian are scaled to have unit length.private intVariables used for restart information.protected intinteger scalar containing the number of iterations until termination.private intVariables used for restart information.private intVariables used for restart information.protected double[][]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.private intinteger scalar containing the number of function evaluations caused by computing Jacobians with difference methods.private final intprivate intDOCUMENT ME!private intThe suffices km2 and km1 in the names of the variables represent time step k-2 and k-1 respectively.private intThe suffices km2 and km1 in the names of the variables represent time step k-2 and k-1 respectively.private final intprivate intVariables used for restart information.private final intprivate final intprivate final intprivate final intprivate intinteger scalar containing the number of function evaluations caused by the linesearch algorithm.private final intprotected intDOCUMENT ME!private intLeading dimension of array gmat mdg must be >= param if secondAllowed is true.private final intprivate final intprivate doubleDOCUMENT ME!protected intinteger scalar containing the number of data points.private final intprivate final intprotected booleanprivate doubleprotected intvariables integer scalar containing the number of unknowns.protected doubleparameter convergence constant Used to test for convergence by the relative change in a[] being less than the parameterConvergence.private final intprivate final intprivate doubleDOCUMENT ME!private doubleDOCUMENT ME!private doubledouble scalar containging the value of the objective function = (0.5 * chisquare) at the termination point a.private doubleDOCUMENT ME!private doubleDOCUMENT ME!private int[]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.private doubleDOCUMENT ME!private final intprivate final intprivate final intprivate doubleDOCUMENT ME!private doublescalar containing the predicted reduction in the objective if pseudoRank from previous step is used.private doubleDOCUMENT ME!private doubleDOCUMENT ME!protected doublerelative convergence constant Used to test for convergence by reduction in objective function being less than relativeConvergence squared.protected double[]1D array of doubles of dimension nPts containing the value of the residuals at the termination point a;.private booleanDOCUMENT ME!private doubleDOCUMENT ME!private doubleDOCUMENT ME!private intThe suffices km2 and km1 in the names of the variables represent time step k-2 and k-1 respectively.private doubleDOCUMENT ME!private final intprivate doubleDOCUMENT ME!private doubleDOCUMENT ME!private doubleDOCUMENT ME!private intDOCUMENT ME!protected booleanThe method of Newton is allowed at the end of the iteration in some situations (large residuals).private intinteger scalar containing the number of function evaluations caused by using second derivatives in the method of Newton.private doubleDOCUMENT ME!private doubleDOCUMENT ME!private doubledouble scalar containing an estimate of the linear convergence factor.private doubleprivate doubleprivate doubleprivate doublesingle relative precision.protected doubleDOCUMENT ME!private doubleDOCUMENT ME!private intprivate booleanprotected doublepseudo rank tolerance constant used to determine the pseudo rank of the Jacobian J.private final intprivate double[]1D array of length nPts containing the orthogonal projection of residuals onto space spanned by the first pseudoRank linear independent columns of the Jacobian.private doubleDOCUMENT ME!private doubleDOCUMENT ME!private doubleDOCUMENT ME!private final intprivate double[]DOCUMENT ME!private double[]DOCUMENT ME!private double[]DOCUMENT ME!private double[]DOCUMENT ME!private final intprivate final intprivate doubleDOCUMENT ME!private doubleDOCUMENT ME!private doubleDOCUMENT ME!private double[]DOCUMENT ME!private double[]DOCUMENT ME! -
Constructor Summary
ConstructorsConstructorDescriptionNLConstrainedEngine(int nPts, int param) NLConstrainedEngine - non-linear fit to a function. -
Method Summary
Modifier and TypeMethodDescriptionprivate 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 voidvoidprivate voidevreuc(int[] prank) DOCUMENT ME!private voidCreates 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 - accessor to chi-squared value (goodness-of-fit measure).intintdouble[]getParameters accessor to function parameters.double[]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 Details
-
big
private static final double bigDOCUMENT ME!- See Also:
-
a
protected double[] aOn completion if exitStatus >= 0 a[] contains the latest (best) estimate of the solution point. -
absoluteConvergence
protected double absoluteConvergenceabsolute convergence constant Used to test for convergence by the sum of squares being less than the absoluteConvergence squared. -
bl
protected double[] blDOCUMENT ME! -
bounds
protected int boundsinteger 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[] buDOCUMENT ME! -
jacobian
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. -
ctrlMat
protected int[] ctrlMatWrapper for ctrl or lctrl communication with driver. -
dyda
protected double[] dydaDOCUMENT ME! -
stdv
protected double stdvDOCUMENT ME! -
gues
protected double[] guesDOCUMENT ME! -
internalScaling
protected boolean internalScalingIf 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 itersinteger scalar containing the number of iterations until termination. -
maxIterations
protected int maxIterationsDOCUMENT ME! -
nPts
protected int nPtsinteger scalar containing the number of data points. -
param
protected int paramvariables integer scalar containing the number of unknowns. -
parameterConvergence
protected double parameterConvergenceparameter convergence constant Used to test for convergence by the relative change in a[] being less than the parameterConvergence. -
relativeConvergence
protected double relativeConvergencerelative convergence constant Used to test for convergence by reduction in objective function being less than relativeConvergence squared. -
residuals
protected double[] residuals1D array of doubles of dimension nPts containing the value of the residuals at the termination point a;. -
secondAllowed
protected boolean secondAllowedThe 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 tolerancepseudo rank tolerance constant used to determine the pseudo rank of the Jacobian J. -
xSeries
private double[] xSeriesDOCUMENT ME! -
ySeries
private double[] ySeriesDOCUMENT ME! -
aDiff
private double aDiffDOCUMENT ME! -
alfnoi
private double alfnoiDOCUMENT ME! -
alpha
private double alphaDOCUMENT ME! -
alphup
private double alphupDOCUMENT ME! -
aset
private 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]. -
beta
private double betascalar containing the norm of the orthogonal projection of residuals onto the space spanned by the columns of the Jacobian. -
betkm2
private double betkm2DOCUMENT ME! -
alfkm2
private double alfkm2DOCUMENT ME! -
betkm1
private double betkm1DOCUMENT ME! -
d1km1
private double d1km1DOCUMENT ME! -
fsqkm1
private double fsqkm1DOCUMENT ME! -
dxnkm1
private double dxnkm1DOCUMENT ME! -
alfkm1
private double alfkm1DOCUMENT ME! -
aupkm1
private double aupkm1DOCUMENT ME! -
bn
private double bnDOCUMENT ME! -
cnorm
private double cnormDOCUMENT ME! -
ctrl
private int ctrlctrl 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 invalid input: '<' -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 invalid input: '<' -10. If you wish to compute the Jacobian numerically on return, set ctrl = 0. -
d1sqs
private double d1sqsscalar containing the predicted reduction in the objective function if gn-direction is used. -
diag
private double[] diag1D double array of length param conatiaing the diagonal elements of the diagonal matrix D if internalScaling is true. Otherwise, undefined. -
dx
private double[] dxdouble working areas 1D array of length param containing the solution of J * dx = -residuals. -
dxnorm
private double dxnormDOCUMENT ME! -
eps
private double epsDOCUMENT ME! -
epsl
private double epslDOCUMENT ME! -
errorStatus
private int errorStatusDOCUMENT ME! -
eval
private int evalDOCUMENT ME! -
exitStatus
private int exitStatusinteger 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 invalid input: '<'> 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 invalid input: '<' 0 indicates that no convergence criterion is fulfilled, but some abnormal termination criterion is satisfied = -1 Invalid starting condition: nPts invalid input: '<' param or param invalid input: '<'= 0 or nPts invalid input: '<'= 0 or maxIterations invalid input: '<'= 0 or relativeConvergence invalid input: '<' 0 or relativeConvergence invalid input: '<' 0 or absoluteConvergence invalid input: '<' 0 or tolerance invalid input: '<'= 0 or parameterConvergence invalid input: '<' 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 invalid input: '<' -10 Termination due to user stop indicator -
fsum
private double fsumDOCUMENT ME! -
funcEval
private int funcEvalinteger scalar containing the total number of function evaluations done inside this routine. -
g
private double[] g1D array of length param containing the gradient of the objective at the current point. -
gmat
private 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. -
gndok
private boolean gndokDOCUMENT ME! -
gnorm
private double gnormscalar containing norm of the gradient divided by norm of Jacobian. -
icount
private int icountVariables used for restart information. -
lattry
private int lattryVariables used for restart information. -
itotal
private int itotalVariables used for restart information. -
irank
private int irankVariables used for restart information. -
imax
private int imaxVariables used for restart information. -
ival
private int ivalVariables used for restart information. -
iev
private int ievDOCUMENT ME! -
ifree
private int ifreeDOCUMENT ME! -
indic
private int indicDOCUMENT ME! -
info
private int infoConsistently use 1 base indexing rather than 0 based indexing -
jacobianEval
private int jacobianEvalinteger scalar containing the number of function evaluations caused by computing Jacobians with difference methods. -
kod
private int kodDOCUMENT ME! -
lineEval
private int lineEvalinteger scalar containing the number of function evaluations caused by the linesearch algorithm. -
mdg
private int mdgLeading dimension of array gmat mdg must be >= param if secondAllowed is true. -
noise
private double noiseDOCUMENT ME! -
constraintAct
private int constraintActNumber of active constraints. -
pgb1
private double pgb1DOCUMENT ME! -
pgb2
private double pgb2DOCUMENT ME! -
phi
private double phidouble scalar containging the value of the objective function = (0.5 * chisquare) at the termination point a. -
phikp1
private double phikp1DOCUMENT ME! -
philat
private double philatDOCUMENT ME! -
bestpg
private double bestpgDOCUMENT ME! -
pivit
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. -
pMinrm
private double pMinrmDOCUMENT ME! -
qMinrm
private double qMinrmDOCUMENT ME! -
deltaMinrm
private double deltaMinrmDOCUMENT ME! -
a1div3
private double a1div3DOCUMENT ME! -
predb
private double predbDOCUMENT ME! -
prekm1
private double prekm1scalar containing the predicted reduction in the objective if pseudoRank from previous step is used. -
rabs
private double rabsDOCUMENT ME! -
restart
private boolean restartDOCUMENT ME! -
rlenb
private double rlenbDOCUMENT ME! -
rmin
private double rminDOCUMENT ME! -
kodkm2
private int kodkm2The 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 rngkm1The 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 kodkm1The 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 rootspDOCUMENT ME! -
bl0
private double bl0DOCUMENT ME! -
bu0
private double bu0DOCUMENT ME! -
secind
private int secindDOCUMENT ME! -
secondEval
private int secondEvalinteger scalar containing the number of function evaluations caused by using second derivatives in the method of Newton. -
smax
private double smaxDOCUMENT ME! -
sn
private double snDOCUMENT ME! -
speed
private double speeddouble scalar containing an estimate of the linear convergence factor. -
srelpr
private double srelprsingle relative precision. -
stepb
private double stepbDOCUMENT ME! -
v
private 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. -
v0norm
private double v0normDOCUMENT ME! -
v1norm
private double v1normDOCUMENT ME! -
v2norm
private double v2normDOCUMENT ME! -
scv0v1
private double scv0v1DOCUMENT ME! -
scv0v2
private double scv0v2DOCUMENT ME! -
scv1v2
private double scv1v2DOCUMENT ME! -
w0
private double[] w0DOCUMENT ME! -
w1
private double[] w1DOCUMENT ME! -
w2
private double[] w2DOCUMENT ME! -
w3
private double[] w3DOCUMENT ME! -
x1Minrm
private double x1MinrmDOCUMENT ME! -
x2Minrm
private double x2MinrmDOCUMENT ME! -
x3Minrm
private double x3MinrmDOCUMENT 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:
-
ROSENBROCK
private final int ROSENBROCK- See Also:
-
FREUDENSTEIN_AND_ROTH
private final int FREUDENSTEIN_AND_ROTH- See Also:
-
POWELL_BADLY_SCALED
private final int POWELL_BADLY_SCALED- See Also:
-
BROWN_BADLY_SCALED
private final int BROWN_BADLY_SCALED- See Also:
-
BEALE
private final int BEALE- See Also:
-
JENNRICH_AND_SAMPSON
private final int JENNRICH_AND_SAMPSON- See Also:
-
HELICAL_VALLEY
private final int HELICAL_VALLEY- See Also:
-
GAUSSIAN
private final int GAUSSIAN- See Also:
-
BARD
private final int BARD- See Also:
-
MEYER
private final int MEYER- See Also:
-
GULF_RESEARCH_AND_DEVELOPMENT
private final int GULF_RESEARCH_AND_DEVELOPMENT- See Also:
-
BOX_3D
private final int BOX_3D- See Also:
-
POWELL_SINGULAR
private final int POWELL_SINGULAR- See Also:
-
WOOD
private final int WOOD- See Also:
-
KOWALIK_AND_OSBORNE
private final int KOWALIK_AND_OSBORNE- See Also:
-
BROWN_AND_DENNIS
private final int BROWN_AND_DENNIS- See Also:
-
OSBORNE1
private final int OSBORNE1- See Also:
-
BIGGS_EXP6
private final int BIGGS_EXP6- See Also:
-
OSBORNE2
private final int OSBORNE2- See Also:
-
WATSON
private final int WATSON- See Also:
-
EXTENDED_ROSENBROCK
private final int EXTENDED_ROSENBROCK- See Also:
-
EXTENDED_POWELL_SINGULAR
private final int EXTENDED_POWELL_SINGULAR- See Also:
-
PENALTY_FUNCTION_I
private final int PENALTY_FUNCTION_I- See Also:
-
PENALTY_FUNCTION_II
private final int PENALTY_FUNCTION_II- See Also:
-
VARIABLY_DIMENSIONED_FUNCTION
private final int VARIABLY_DIMENSIONED_FUNCTION- See Also:
-
TRIGONOMETRIC
private final int TRIGONOMETRIC- See Also:
-
BROWN_ALMOST_LINEAR
private final int BROWN_ALMOST_LINEAR- See Also:
-
DISCRETE_BOUNDARY_VALUE
private final int DISCRETE_BOUNDARY_VALUE- See Also:
-
DISCRETE_INTEGRAL
private final int DISCRETE_INTEGRAL- See Also:
-
BROYDEN_TRIDIAGONAL
private final int BROYDEN_TRIDIAGONAL- See Also:
-
BROYDEN_BANDED
private final int BROYDEN_BANDED- See Also:
-
LINEAR_FULL_RANK
private final int LINEAR_FULL_RANK- See Also:
-
LINEAR_RANK1
private final int LINEAR_RANK1- See Also:
-
LINEAR_RANK1_WITH_ZERO_COLUMNS_AND_ROWS
private final int LINEAR_RANK1_WITH_ZERO_COLUMNS_AND_ROWS- See Also:
-
CHEBYQUAD
private final int CHEBYQUAD- See Also:
-
HOCK25
private final int HOCK25- See Also:
-
LEVMAR_ROSENBROCK
private final int LEVMAR_ROSENBROCK- See Also:
-
MODIFIED_ROSENBROCK
private final int MODIFIED_ROSENBROCK- See Also:
-
POWELL_2_PARAMETER
private final int POWELL_2_PARAMETER- See Also:
-
HOCK1
private final int HOCK1- See Also:
-
HOCK21_MODIFIED
private final int HOCK21_MODIFIED- See Also:
-
HATFLDB
private final int HATFLDB- See Also:
-
HATFLDC
private final int HATFLDC- See Also:
-
EQUILIBRIUM_COMBUSTION
private final int EQUILIBRIUM_COMBUSTION- See Also:
-
MADSEN
private final int MADSEN- See Also:
-
HOCK3
private final int HOCK3- See Also:
-
HOCK4
private final int HOCK4- See Also:
-
CERES_CURVE_FITTING
private final int CERES_CURVE_FITTING- See Also:
-
-
Constructor Details
-
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 Details
-
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!
-
gndunc
private double gndunc(boolean internalScaling, int[] prank, double[] work) DOCUMENT ME!- Parameters:
internalScaling- DOCUMENT ME!work- DOCUMENT ME!pseudoRankMat- 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:
pmax- DOCUMENT ME!phikm2- 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!
-