fredrik-johansson/mpmath — pull request #294 by oyamad (2014-08-25 16:03:42+00:00)
Title: Add routines to compute stochastic eigenvectors of Markov transition matrices

Hello,
this pull request is to add routines to compute the stationary distribution vector of a Markov matrix, implementing an algorithm called the "GTH-algorithm", a numerically stable variant of Gaussian elimination. They should be useful in particular when the subdominant (second largest) eigenvalue of the Markov matrix is close to 1.

The routines, which are specialized in computing the eigenvector with eigenvalue 1 for irreducible Markov matrices, are much faster than the general purpose routine `eig`.

I also included some test code and added documents that describe the routines.
I hope you find this useful.