|
||||||||||
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 IterationMonitor
public boolean isFirst()
IterationMonitor
isFirst
in interface IterationMonitor
public void next()
IterationMonitor
next
in interface IterationMonitor
public int iterations()
IterationMonitor
iterations
in interface IterationMonitor
public boolean converged(Vector r, Vector x) throws IterativeSolverNotConvergedException
IterationMonitor
converged
in interface IterationMonitor
r
- Residual-vectorx
- State-vector
IterativeSolverNotConvergedException
public boolean converged(double r, Vector x) throws IterativeSolverNotConvergedException
IterationMonitor
converged
in interface IterationMonitor
r
- Residual-normx
- State-vector
IterativeSolverNotConvergedException
public boolean converged(double r) throws IterativeSolverNotConvergedException
IterationMonitor
converged
in interface IterationMonitor
r
- 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 IterationMonitor
r
- Residual-vector
IterativeSolverNotConvergedException
public Vector.Norm getNormType()
IterationMonitor
getNormType
in interface IterationMonitor
public void setNormType(Vector.Norm normType)
IterationMonitor
setNormType
in interface IterationMonitor
public IterationReporter getIterationReporter()
IterationMonitor
getIterationReporter
in interface IterationMonitor
public void setIterationReporter(IterationReporter monitor)
IterationMonitor
setIterationReporter
in interface IterationMonitor
public double residual()
IterationMonitor
residual
in interface IterationMonitor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |