5903 Intro Scientific Prog:
QR Eigenvalues: Specification

The prototype for the function you are creating is
   int QREvals(Matrix A,  Vector  v, int n, float Tol)
where Matrix and Vector refer to our typdef structures.           
  1. The function should compute the eigenvalues of a A, return the ordered (from largest to smallest) eigenvalues in v, with a maximum of n iterations, untill it satisfies some error estimate less than Tol. It needs to use thesimplest QR algorithm (look in Numerical recipe in C or Wikipedia).  It needs to be wel documented.  You need to test your matrix for symmetry.  Make sure you document this test. You need to use the gsl QR decomposition command within your algorithm. You can not use the gsl eigenvalue commands inside you procedure. The return value should be the number of iterations.  In the event the output does not meet the tolerance the dimensioning of v should be set to be the negative of the expected size with float zero entries.  
  2.  You need to demonstrate that this function works appropriately.  In main: read in a matrix from stdin (as always redirectable from a file) using our matrix file format, compute the eigenvalues using your procedure, compare these eigenvalues to the output from the gsl eigenvalue commands (give some error result printed in a message), and output your eigenvalues to stdout in our vector file format.