mat.cpp
// Destroys self by replacing self with EIGENVECTORS in rows.
// Returns a new matrix (a row vector) with the EIGENVALUES in it.
// Eigenvalues and vectors returned sorted from largest magnitude to smallest
// WARNING: allocates new matrix for answer
Destroys self by replacing self with EIGENVECTORS in rows.
Returns a new matrix (a row vector) with the EIGENVALUES in it.
Eigenvalues and vectors returned sorted from largest magnitude to smallest
WARNING: allocates new matrix for answer
Destroys self by replacing self with EIGENVECTORS in rows . Returns a new matrix ( a row vector ) with the EIGENVALUES in it . Eigenvalues and vectors returned sorted from largest magnitude to smallest WARNING : allocates new matrix for answer
Matrix Matrix::eigenSystem()
{
    assertDefined("eigenSystem");
    assertSquare("eigenSystem");
    Matrix values(1, maxc);   
    {
        double *d, *e;
        tridiagonalize(d, e);         
        eigen(d, e, maxc, m);         
        delete values.m[0];           
        values.m[0] = d;
        delete [] e;
    }
    transposeSelf();              
    isort(values.m[0], m, maxc);  
    values.defined = true;        
    return values;
}
Matrix Matrix :: eigenSystem ( ) { assertDefined ( " " ) ; assertSquare ( " " ) ; Matrix values ( 1 , maxc ) ; { double * d , * e ; tridiagonalize ( d , e ) ; eigen ( d , e , maxc , m ) ; delete values . m [ 0 ] ; values . m [ 0 ] = d ; delete [ ] e ; } transposeSelf ( ) ; isort ( values . m [ 0 ] , m , maxc ) ; values . defined = true ; return values ; }
Destroys self by replacing self with EIGENVECTORS in rows.
Destroys self by replacing self with EIGENVECTORS in rows .
// allocates space for eigen values // allocates space for 2 double arrays // returns eigen values in d // save the eigen values from above routines // result was returned in columns so put it in rows // sort both eigenvalues and vectors in rows so vector with max eigenvalue is first // mark eigen value matrix as defined