David Joyner wrote:
> On Thu, Apr 3, 2008 at 6:38 AM, Jason Grout <[EMAIL PROTECTED]> wrote:
>>  Currently, depending on the matrix type, there are several different
>>  ways to get eigenvalues and eigenvectors and it is hard to remember
>>  which function goes with which type.
>>
>>  How about we unify the interface?
>>
>>  Proposal:
>>
>>  eigenspaces: Return a list of tuples, the first element being an
>>  eigenvalue and the second being the associated eigenspace.
>>
>>  eigenvalues: Return a list of eigenvalues.
>>
>>  eigenvectors(left=True, right=False): Return a list of eigenvalues and
>>  an associated matrix (or matrices) containing associated eigenvectors.
> 
> I like your idea in general but what does eigenvectors(left=True, right=False)
> mean?

Sorry for the confusion:

I want a way to tell eigenvectors that I would like either the right or 
left or both sets of eigenvectors.  I'm inspired by the interface from 
scipy (the scipy.linalg.decomp.eig function):

eigenvectors() returns the eigenvalues and left eigenvectors
eigenvectors(left=True) returns the eigenvalues and left eigenvectors
eigenvectors(right=True) returns the eigenvalues and right eigenvectors
eigenvectors(left=True, right=True) returns the eigenvalues and both 
sets of eigenvectors

so basically, I mean the function is defined as

def eigenvectors(left=False, right=False)

but if both are false, then we set left=True anyway so that we have 
something to return.

The eig function mentioned above has this signature:

def eig(a,b=None, left=False, right=True, overwrite_a=False, 
overwrite_b=False):

So by default, it returns the right eigenvectors.  a is the original 
matrix; b is the matrix for computing generalized eigenvalues, and the 
overwrite parameters are there to tell lapack that it's okay to 
overwrite the matrices for speed.


Oh, and the eigenspaces function should have similar left and right 
keyword arguments, as well as eigenspaces_left and eigenspaces_right 
wrappers.

Thanks,

Jason


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to