Package no.uib.cipr.matrix.sparse
Interface IterationMonitor
-
- All Known Implementing Classes:
AbstractIterationMonitor
,DefaultIterationMonitor
,MatrixIterationMonitor
public interface IterationMonitor
Monitors 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 boolean
converged(double r)
Checks for convergenceboolean
converged(double r, Vector x)
Checks for convergenceboolean
converged(Vector r)
Checks for convergenceboolean
converged(Vector r, Vector x)
Checks for convergenceIterationReporter
getIterationReporter()
Returns current iteration reporterVector.Norm
getNormType()
Returns the vector-norm in useboolean
isFirst()
Returns true for the first iterationint
iterations()
Number of iterations performedvoid
next()
Increases iteration counterdouble
residual()
Returns current residualvoid
setFirst()
Resets the iterationvoid
setIterationReporter(IterationReporter monitor)
Sets new iteration reportervoid
setNormType(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 IterativeSolverNotConvergedException
Checks for convergence- Parameters:
r
- Residual-normx
- State-vector- Returns:
- True if converged
- Throws:
IterativeSolverNotConvergedException
-
converged
boolean converged(double r) throws IterativeSolverNotConvergedException
Checks 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
-
-