|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.analysis.integration.univariate.riemann.Riemann
public class Riemann
This class uses an integrator together with Romberg's method. It tries to determine the appropriate integrator depending on the function and the integral interval.
| Field Summary | |
|---|---|
int |
maxIterations
the maximum number of iterations |
double |
precision
the convergence threshold |
| Constructor Summary | |
|---|---|
Riemann()
Construct a default integrator. |
|
Riemann(double precision,
int maxIterations)
Construct an integrator. |
|
| Method Summary | |
|---|---|
double |
integrate(UnivariateRealFunction f,
double a,
double b)
Integrate function f from a to b. |
double |
integrate(UnivariateRealFunction f,
double a,
double b,
Substitution change)
Riemann function f from a to b, using a Substitution rule. |
double |
precision()
Get the convergence threshold. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final int maxIterations
public final double precision
| Constructor Detail |
|---|
public Riemann()
public Riemann(double precision,
int maxIterations)
precision - the convergence thresholdmaxIterations - the maximum number of iterations| Method Detail |
|---|
public double integrate(UnivariateRealFunction f,
double a,
double b)
Integratorf from a to b.
/ b
| f(x) dx
/ a
integrate in interface Integratorf - a univariate functiona - lower limitb - upper limit
public double integrate(UnivariateRealFunction f,
double a,
double b,
Substitution change)
f from a to b, using a Substitution rule.
/ b
| f(x) dx
/ a
f - a univariate functiona - lower limitb - upper limitchange - the substitution rule
public double precision()
Integrator
For example, for an IterativeIntegrator,
the integral is considered converged
if the relative error of two successive sums is less than the threshold.
precision in interface Integrator
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||