SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.matrix.doubles.factorization.eigen
Class Hessenberg.DefaultDeflationCriterion

java.lang.Object
  extended by com.numericalmethod.suanshu.matrix.doubles.factorization.eigen.Hessenberg.DefaultDeflationCriterion
All Implemented Interfaces:
Hessenberg.DeflationCriterion
Enclosing class:
Hessenberg

public static class Hessenberg.DefaultDeflationCriterion
extends java.lang.Object
implements Hessenberg.DeflationCriterion

Users can override the default implementation to define their 0 threshold.

The default is to use Eq. 7.5.2 in Golub and van Loan: H[i,j] is negligible when

| H[i,j] | < tol * (| H[i-1,j] | + | H[i,j+1] |)

Or, when

| H[i-1,j] | + | H[i,j+1] | == 0
we use eq. 2.26 in Matrix Algorithms, Volume II by Steward G. W.
| H[i,j] | < tol * ||A||F


Constructor Summary
Hessenberg.DefaultDeflationCriterion()
           
 
Method Summary
 double getTolerance()
          Get the tolerance in Steward's deflation criterion.
 boolean isNegligible(Matrix H, int row, int col, double epsilon)
          Check if H[row, col] is negligible by Steward's deflation criterion.
 void setTolerance(double tol)
          Set the tolerance, tol in Steward's deflation criterion.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Hessenberg.DefaultDeflationCriterion

public Hessenberg.DefaultDeflationCriterion()
Method Detail

setTolerance

public void setTolerance(double tol)
Set the tolerance, tol in Steward's deflation criterion. The default is 1e-12.

Parameters:
tol - the tolerance in Steward's deflation criterion

getTolerance

public double getTolerance()
Get the tolerance in Steward's deflation criterion.

Returns:
the tolerance in Steward's deflation criterion

isNegligible

public boolean isNegligible(Matrix H,
                            int row,
                            int col,
                            double epsilon)
Check if H[row, col] is negligible by Steward's deflation criterion.

Specified by:
isNegligible in interface Hessenberg.DeflationCriterion
Parameters:
H - a matrix
row - row index
col - column index
epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
Returns:
true iff
| H[row,col] | < tol * (| H[row-1,col] | + | H[row,col+1] |)

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.