|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.uci.ics.jung.algorithms.IterativeProcess
Provides basic infrastructure for iterative algorithms. Services provided include:
Algorithms that subclass this class are typically used in the following way:
FooAlgorithm foo = new FooAlgorithm(...) foo.setMaximumIterations(100); //set up conditions ... foo.evaluate(); //key method which initiates iterative process foo.getSomeResult();
Constructor Summary | |
IterativeProcess()
Generic constructor. |
Method Summary | |
void |
evaluate()
Performs the iterative process. |
double |
getDesiredPrecision()
Returns the desired precision. |
int |
getIterations()
Returns the number of iterations performed. |
int |
getMaximumIterations()
Returns the maximum allowed number of iterations. |
double |
getPrecision()
Returns the attained precision. |
boolean |
hasConverged()
Check to see if the result has been attained. |
double |
relativePrecision(double epsilon,
double x)
|
void |
setDesiredPrecision(double prec)
Defines the desired precision. |
void |
setMaximumIterations(int maxIter)
Defines the maximum allowed number of iterations. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IterativeProcess()
Method Detail |
public void evaluate()
public double getDesiredPrecision()
public int getIterations()
public int getMaximumIterations()
public double getPrecision()
public boolean hasConverged()
public double relativePrecision(double epsilon, double x)
epsilon
- doublex
- double
public void setDesiredPrecision(double prec) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void setMaximumIterations(int maxIter) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |