|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmmc.MathModel
mmc.Interpolate
public class Interpolate
This class provides routines for function interpolation. Include the function to be interpolated in a class that implements the interface FunctionInt or FunctionInt2 (defined below). Methods contained here are based on the Numerical Recipes (W. H. Press et al.).
interface FunctionInt{ double functionInt(double x); } interface FunctionInt2{ double functionInt(double x1, double x2); }
Field Summary | |
---|---|
protected static double |
aBigNumber
|
protected static double |
bigNumber
|
static boolean |
fast
|
double |
precision
|
double |
precision2
|
double |
precisionY
|
double |
worstX
|
double |
worstX2
|
double |
worstY
|
Fields inherited from class mmc.MathModel |
---|
computerPrecision |
Constructor Summary | |
---|---|
Interpolate(double[] x,
double[] y,
int romberg,
boolean rational,
boolean relative)
initializes class for the 1-dimensional function if the arrays already exist. |
|
Interpolate(int max,
double xmin,
double xmax,
FunctionInt function2int,
int romberg,
boolean rational,
boolean relative,
boolean isLog,
int rombergY,
boolean rationalY,
boolean relativeY,
boolean logSubst)
initializes class for the 1-dimensional function |
|
Interpolate(int max1,
double x1min,
double x1max,
int max2,
double x2min,
double x2max,
FunctionInt2 function2int,
int romberg1,
boolean rational1,
boolean relative1,
boolean isLog1,
int romberg2,
boolean rational2,
boolean relative2,
boolean isLog2,
int rombergY,
boolean rationalY,
boolean relativeY,
boolean logSubst)
initializes class for the 2-dimensional function |
Method Summary | |
---|---|
double |
findLimit(double y)
finds x: f(x)=y, 1d initialization required |
double |
findLimit(double x1,
double y)
finds x: f(a,x)=y, 2d initialization required |
double |
functionInt(double x)
defines a function for every row |
double |
interpolate(double x)
interpolates f(x) for 1d function |
double |
interpolate(double x1,
double x2)
interpolates f(x) for 2d function |
double |
interpolateArray(double x)
interpolates f(x) for 1d function if the arrays already exist. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public double precision
public double worstX
public double precision2
public double worstX2
public double precisionY
public double worstY
public static boolean fast
protected static final double bigNumber
protected static final double aBigNumber
Constructor Detail |
---|
public Interpolate(int max, double xmin, double xmax, FunctionInt function2int, int romberg, boolean rational, boolean relative, boolean isLog, int rombergY, boolean rationalY, boolean relativeY, boolean logSubst)
public Interpolate(int max1, double x1min, double x1max, int max2, double x2min, double x2max, FunctionInt2 function2int, int romberg1, boolean rational1, boolean relative1, boolean isLog1, int romberg2, boolean rational2, boolean relative2, boolean isLog2, int rombergY, boolean rationalY, boolean relativeY, boolean logSubst)
public Interpolate(double[] x, double[] y, int romberg, boolean rational, boolean relative)
Method Detail |
---|
public double functionInt(double x)
functionInt
in interface FunctionInt
public double interpolate(double x)
public double interpolate(double x1, double x2)
public double interpolateArray(double x)
public double findLimit(double y)
public double findLimit(double x1, double y)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |