You are viewing an archived page from the original site. Go to the new numericalmethod.com →

Changeset 134 in public for benchmark


Ignore:
Timestamp:
1/3/2014 6:13:39 PM (5 days ago)
Author:
linsong
Message:

CHG: Changed some code in EigenDecomposition?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/src/main/java/com/numericalmethod/benchmark/implementation/JlapackImplementation.java

    r133 r134  
    152152        addExecutable(EigenDecomposition.class, new Executable<LapackMatrix>() { 
    153153            public void execute(LapackMatrix[] matrices) { 
    154                 LapackMatrix Q = matrices[0].copy(); // make a copy 
     154                LapackMatrix Q = matrices[0].zero(); // initialized to zero 
    155155                int size = Q.nRows(); 
    156156                double[] D = new double[size]; 
    … …  
    185185                    throw new IllegalArgumentException("Eigen decomposition is unsuccessful!"); 
    186186                } 
    187                 if (info.val > 0) { // see the LAPACK documentation 
    188                     throw new IllegalArgumentException( 
    189                             String.format("Eigen decomposition failed on submatrix (%d, %d) -> (%d, %d)",  
    190                             info.val / (size + 1), info.val / (size + 1),  
    191                             info.val % (size + 1), info.val % (size + 1))); 
     187                if (info.val > 0) { 
     188                    throw new IllegalArgumentException("Eigen decomposition failed!"); 
    192189                } 
    193190            } 
Note: See TracChangeset for help on using the changeset viewer.