|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectno.uib.cipr.matrix.sparse.AbstractIterationMonitor
public abstract class AbstractIterationMonitor
Partial implementation of an iteration reporter
| Field Summary | |
|---|---|
protected int |
iter
Iteration number |
protected Vector.Norm |
normType
Vector-norm |
protected IterationReporter |
reporter
Iteration reporter |
protected double |
residual
Current residual |
| Constructor Summary | |
|---|---|
AbstractIterationMonitor()
Constructor for AbstractIterationMonitor. |
|
| Method Summary | |
|---|---|
boolean |
converged(double r)
Checks for convergence |
boolean |
converged(double r,
Vector x)
Checks for convergence |
boolean |
converged(Vector r)
Checks for convergence |
boolean |
converged(Vector r,
Vector x)
Checks for convergence |
protected abstract boolean |
convergedI(double r)
|
protected abstract boolean |
convergedI(double r,
Vector x)
|
IterationReporter |
getIterationReporter()
Returns current iteration reporter |
Vector.Norm |
getNormType()
Returns the vector-norm in use |
boolean |
isFirst()
Returns true for the first iteration |
int |
iterations()
Number of iterations performed |
void |
next()
Increases iteration counter |
double |
residual()
Returns current residual |
void |
setFirst()
Resets the iteration |
void |
setIterationReporter(IterationReporter monitor)
Sets new iteration reporter |
void |
setNormType(Vector.Norm normType)
Sets the vector-norm to calculate with |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected int iter
protected Vector.Norm normType
protected IterationReporter reporter
protected double residual
| Constructor Detail |
|---|
public AbstractIterationMonitor()
| Method Detail |
|---|
public void setFirst()
IterationMonitor
setFirst in interface IterationMonitorpublic boolean isFirst()
IterationMonitor
isFirst in interface IterationMonitorpublic void next()
IterationMonitor
next in interface IterationMonitorpublic int iterations()
IterationMonitor
iterations in interface IterationMonitor
public boolean converged(Vector r,
Vector x)
throws IterativeSolverNotConvergedException
IterationMonitor
converged in interface IterationMonitorr - Residual-vectorx - State-vector
IterativeSolverNotConvergedException
public boolean converged(double r,
Vector x)
throws IterativeSolverNotConvergedException
IterationMonitor
converged in interface IterationMonitorr - Residual-normx - State-vector
IterativeSolverNotConvergedException
public boolean converged(double r)
throws IterativeSolverNotConvergedException
IterationMonitor
converged in interface IterationMonitorr - Residual-norm
IterativeSolverNotConvergedException
protected abstract boolean convergedI(double r,
Vector x)
throws IterativeSolverNotConvergedException
IterativeSolverNotConvergedException
protected abstract boolean convergedI(double r)
throws IterativeSolverNotConvergedException
IterativeSolverNotConvergedException
public boolean converged(Vector r)
throws IterativeSolverNotConvergedException
IterationMonitor
converged in interface IterationMonitorr - Residual-vector
IterativeSolverNotConvergedExceptionpublic Vector.Norm getNormType()
IterationMonitor
getNormType in interface IterationMonitorpublic void setNormType(Vector.Norm normType)
IterationMonitor
setNormType in interface IterationMonitorpublic IterationReporter getIterationReporter()
IterationMonitor
getIterationReporter in interface IterationMonitorpublic void setIterationReporter(IterationReporter monitor)
IterationMonitor
setIterationReporter in interface IterationMonitorpublic double residual()
IterationMonitor
residual in interface IterationMonitor
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||