|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object util.wavelet.GaussianFit
public class GaussianFit
A function representing a gaussian to be used in AnalyticProblems.marquardt(int, int, float[], float[], float[][], numal.lowprecision.Function, float[])
.
Constructor Summary | |
---|---|
GaussianFit(float[] x,
float[] y)
|
Method Summary | |
---|---|
void |
computeJacobian(int m,
int n,
float[] parameter,
float[] rv,
float[][] jac)
Get the partial derivatives jac[i][j] = drv[i]/dpar[j], obtained with the current values of the parameters. |
boolean |
computeResidualVector(int m,
int n,
float[] parameter,
float[] rv)
Get residual vector rv[i] = f(x[i],par) - y[i]. |
static float |
f(float x,
float[] parameter)
Get the value of this function for a given abcissa and parameters. |
float |
getAbsoluteTolerance()
Absolute tolerance for the difference between the Euclidian norm of the ultimate and penultimate residual vector (value of epsilon_a) the process is terminated if the improvement of the sum of the squares is less than relativeTolerance*(sum of the squares)+absoluteTolerance*absoluteTolerance |
float[] |
getAnalyticValues(int m,
float[] parameter)
Get the analytic values of the function for the given set of parameters and for all abcissa. |
int |
getInvocations()
Maximum allowed number of invocations of Function.computeResidualVector(int, int, float[], float[]) |
float |
getMachinePrecision()
Machine precision |
float |
getRelativeTolerance()
Relative tolerance for the difference between the Euclidian norm of the ultimate and penultimate residual vector (value of epsilon_re) (see absoluteTolerance) |
float |
getStartingValue()
Starting value used for the relation between the gradient and the Gauss-Newton direction (value of ξ); if the problem is well conditioned then a suitable value for startingValue will be 0.01; if the problem is ill conditioned then startingValue should be greater, but the value of startingValue must satisfy : machinePrecision < startingValue ≤ 1 / machinePrecision |
static float |
getX(int pixel)
Get the wavelength as a function of SDSS spectra pixel. |
static void |
main(String[] args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GaussianFit(float[] x, float[] y)
Method Detail |
---|
public static float getX(int pixel)
pixel
- an integer representing the position in the SDSS spectra
public static void main(String[] args)
public static float f(float x, float[] parameter)
x
- abcissa at which this function is to be evaluatedparameter
- array of function parameters
public float[] getAnalyticValues(int m, float[] parameter)
Function
getAnalyticValues
in interface Function
m
- number of sample points used in the fittingparameter
- an array of function parameters
public boolean computeResidualVector(int m, int n, float[] parameter, float[] rv)
Function
computeResidualVector
in interface Function
m
- number of sample points used in the fittingn
- number of parameters, must be less than or equal to mparameter
- input: current values of parameters (shouldn't be altered by funct)rv
- output: residual vector obtained with current value of parameters; i.e f(x[i],par) - y[i]
public void computeJacobian(int m, int n, float[] parameter, float[] rv, float[][] jac)
Function
AnalyticProblems.marquardt(int, int, float[], float[], float[][], numal.lowprecision.Function, float[])
.
POSTCONDITION: parameter array must not be altered.
computeJacobian
in interface Function
m
- number of sample points used in the fittingn
- number of parameters, must be less than or equal to the number of sample pointsparameter
- input: current values of parametersrv
- output: residual vector obtained with current value of parameters; i.e f(x[i],parameter) - y[i]jac
- output: partial derivatives drv[i]/dparameter[j], obtained with the current values of the parameterspublic int getInvocations()
Function
Function.computeResidualVector(int, int, float[], float[])
getInvocations
in interface Function
public float getMachinePrecision()
Function
getMachinePrecision
in interface Function
public float getRelativeTolerance()
Function
getRelativeTolerance
in interface Function
public float getAbsoluteTolerance()
Function
getAbsoluteTolerance
in interface Function
public float getStartingValue()
Function
getStartingValue
in interface Function
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |