public class DefaultImportanceFunction extends ImportanceFunction
Constructor and Description |
---|
DefaultImportanceFunction(Spectrum s,
double tol)
Creates a new DefaultImportanceFunction
|
Modifier and Type | Method and Description |
---|---|
double |
compute(double x)
Computes the value of the function in the point x
|
double |
correct(double x)
Corrects x, if x is out of the spectrum for less than the tolerance of the DefaultImportanceFunction, then returns the nearest spectrum bound
|
public DefaultImportanceFunction(Spectrum s, double tol)
s
- the function's spectrumtol
- the function's tolerancepublic double compute(double x)
ImportanceFunction
compute
in class ImportanceFunction
x
- the point in which to compute the functionpublic double correct(double x)
x
- the double to correct