|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmmc.MathModel
mmc.Integral
public class Integral
This class provides routines for function integration using Romberg method. Include the function to be integrated in a class that implements the interface FunctionOfx (defined below). Methods contained here are based on the Numerical Recipes (W. H. Press et al.) with the following modifications:
interface FunctionOfx{ double function(double x); }
Field Summary |
---|
Fields inherited from class mmc.MathModel |
---|
computerPrecision |
Constructor Summary | |
---|---|
Integral()
initializes class with default settings |
|
Integral(int romberg,
int maxSteps,
double precision)
initializes class - this is the main constructor |
Method Summary | |
---|---|
double |
getUpperLimit()
refines and returns the value of the upper limit x(rand) |
double |
integrateClosed(double min,
double max,
FunctionOfx function2use)
finds integral for closed intervals |
double |
integrateOpened(double min,
double max,
FunctionOfx function2use)
finds integral for opened intervals |
double |
integrateOpened(double min,
double max,
FunctionOfx function2use,
double randomRatio)
finds integral for opened intervals and computes the value of the x(rand) |
double |
integrateWithLog(double min,
double max,
FunctionOfx function2use)
finds integral for opened intervals using log substitution |
double |
integrateWithLog(double min,
double max,
FunctionOfx function2use,
double randomRatio)
finds integral for opened intervals and computes the value of the x(rand) |
double |
integrateWithLogSubstitution(double min,
double max,
FunctionOfx function2use,
double powerOfSubstitution)
finds integral for opened intervals using substitution x -> 1/log(x)^(powerOfSubstitution) |
double |
integrateWithSubstitution(double min,
double max,
FunctionOfx function2use,
double powerOfSubstitution)
finds integral for opened intervals using substitution x -> 1/x^(powerOfSubstitution) |
double |
integrateWithSubstitution(double min,
double max,
FunctionOfx function2use,
double powerOfSubstitution,
double randomRatio)
finds integral for opened intervals using substitution x -> 1/x^(powerOfSubstitution) and computes the value of the x(rand) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Integral()
public Integral(int romberg, int maxSteps, double precision)
Method Detail |
---|
public double integrateClosed(double min, double max, FunctionOfx function2use)
public double integrateOpened(double min, double max, FunctionOfx function2use)
public double integrateOpened(double min, double max, FunctionOfx function2use, double randomRatio)
public double integrateWithSubstitution(double min, double max, FunctionOfx function2use, double powerOfSubstitution)
public double integrateWithSubstitution(double min, double max, FunctionOfx function2use, double powerOfSubstitution, double randomRatio)
public double getUpperLimit()
public double integrateWithLog(double min, double max, FunctionOfx function2use)
public double integrateWithLog(double min, double max, FunctionOfx function2use, double randomRatio)
public double integrateWithLogSubstitution(double min, double max, FunctionOfx function2use, double powerOfSubstitution)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |