Changeset 1476 for trunk


Ignore:
Timestamp:
Sep 4, 2008, 3:51:35 PM (13 years ago)
Author:
Peter
Message:

fixes #300 - I simply removed the sorting

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/pca_test.cc

    r1437 r1476  
    4747  A.transpose();
    4848  utility::PCA pca(A);
     49  for (size_t i=1; i<pca.eigenvalues().size(); ++i)
     50    if (!suite.add(pca.eigenvalues()(i-1)>=pca.eigenvalues()(i)))
     51      suite.err() << "eigenvalues not in non-increasing order\n";
    4952
    5053  return suite.return_value();
  • trunk/test/svd_test.cc

    r1437 r1476  
    5454  theplu::yat::utility::Vector s(svd.s());
    5555  utility::Matrix S(s.size(),s.size());
     56  for (size_t i=1; i<s.size(); ++i)
     57    if (!suite.add(s(i-1)>=s(i)))
     58      suite.err() << "single values not in non-increasing order\n";
    5659  for (size_t i=0; i<s.size(); ++i)
    5760    S(i,i)=s(i);
  • trunk/yat/utility/PCA.cc

    r1437 r1476  
    8686    // make sure that the i:th element is in its correct
    8787    // position (N element --> Ordo( N*N ))
     88    /*
     89      // should not be needed since SVD gives single values ordered
    8890    for ( size_t i = 0; i < eigenvalues_.size(); ++i )
    8991      for ( size_t j = i + 1; j < eigenvalues_.size(); ++j )
     
    9294          eigenvectors_.swap_rows(i,j);
    9395        }
     96    */
    9497  }
    9598
Note: See TracChangeset for help on using the changeset viewer.