Package no.uib.cipr.matrix.sparse
Interface IterationMonitor
-
- All Known Implementing Classes:
AbstractIterationMonitor,DefaultIterationMonitor,MatrixIterationMonitor
public interface IterationMonitorMonitors the iterative solution process for convergence and divergence. Can also report the current progress.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanconverged(double r)Checks for convergencebooleanconverged(double r, Vector x)Checks for convergencebooleanconverged(Vector r)Checks for convergencebooleanconverged(Vector r, Vector x)Checks for convergenceIterationReportergetIterationReporter()Returns current iteration reporterVector.NormgetNormType()Returns the vector-norm in usebooleanisFirst()Returns true for the first iterationintiterations()Number of iterations performedvoidnext()Increases iteration counterdoubleresidual()Returns current residualvoidsetFirst()Resets the iterationvoidsetIterationReporter(IterationReporter monitor)Sets new iteration reportervoidsetNormType(Vector.Norm normType)Sets the vector-norm to calculate with
-
-
-
Method Detail
-
setFirst
void setFirst()
Resets the iteration
-
isFirst
boolean isFirst()
Returns true for the first iteration
-
next
void next()
Increases iteration counter
-
iterations
int iterations()
Number of iterations performed
-
residual
double residual()
Returns current residual
-
converged
boolean converged(Vector r, Vector x) throws IterativeSolverNotConvergedException
Checks for convergence- Parameters:
r- Residual-vectorx- State-vector- Returns:
- True if converged
- Throws:
IterativeSolverNotConvergedException
-
converged
boolean converged(double r, Vector x) throws IterativeSolverNotConvergedExceptionChecks for convergence- Parameters:
r- Residual-normx- State-vector- Returns:
- True if converged
- Throws:
IterativeSolverNotConvergedException
-
converged
boolean converged(double r) throws IterativeSolverNotConvergedExceptionChecks for convergence- Parameters:
r- Residual-norm- Returns:
- True if converged
- Throws:
IterativeSolverNotConvergedException
-
converged
boolean converged(Vector r) throws IterativeSolverNotConvergedException
Checks for convergence- Parameters:
r- Residual-vector- Returns:
- True if converged
- Throws:
IterativeSolverNotConvergedException
-
setIterationReporter
void setIterationReporter(IterationReporter monitor)
Sets new iteration reporter
-
getIterationReporter
IterationReporter getIterationReporter()
Returns current iteration reporter
-
setNormType
void setNormType(Vector.Norm normType)
Sets the vector-norm to calculate with
-
getNormType
Vector.Norm getNormType()
Returns the vector-norm in use
-
-