Package: rogues
rogues 0.5.0Python and Numpy port of Prof. Nicholas Higham's matlab test matricesThese matrices are a collection of interesting matrices that appear in
matlab's 'gallery' collection. This collection was originally defined
and implemented by Prof. Nicholas Higham of Manchester University and
is more fully discussed in "The Test Matrix Toolbox for Matlab
(Version 3.0)", N.J. Higham, Numerical Analysis Report No. 276,
September 1995 and availablehereThe pdf of the 1991 TOMS (Algorithm 694) paper no longer appears to be available for
free. The link to the ACM ishereBy 'interesting' we mean that these matrices either present some
challenges to numerical algorithms or have some a set of interesting
properties. The documentation of the individual functions contains
much more info, as well as references.Also included are a set of matrix utility functions that are needed
for generating some of members of the collection as well as a few
functions from Prof. Higham’s matrixcomp package. One of the more
interesting routines here is mdsmax, a direct search optimization
algorithm.The rogues package depends on numpy and scipy, both of which must be
installed. Additionally, there are a few routines that deal with
plotting, and these use matplotlib. While ipython is not strictly
necessary, it is a very convenient environment for numpy / scipy /
matplotlib. Finally, the unit tests utilize the nose package and the
numpy wrappers around nose. To run the tests you must have nose
installed.  Then, in IPython for example, typeIn [1]: !nosetests roguesThe included matrix generation functions are:cauchyCauchy matrixchebspecChebyshev spectral differentiation matrixchebvandVandermonde-like matrix for the Chebyshev polynomialschowChow matrix - a singular Toeplitz lower Hessenberg matrixclementClement matrix - tridiagonal with zero diagonal entriescompComparison matricescompanCompanion matrixcondexCounterexamples to matrix condition number estimatorscycolMatrix whose columns repeat cyclicallydingdongDingdong matrix - a symmetric Hankel matrixdorrDorr matrix - diagonally dominant, ill conditioned, tridiagonal.dramadahA (0,1) matrix whose inverse has large integer entriesfiedlerFiedler matrix - symmetricforsytheForsythe matrix - a perturbed Jordan blockfrankFrank matrix - ill conditioned eigenvalues.gearmGear matrixgfppMatrix giving maximal growth factor for GW with partial pivotinggrcarGrcar matrix - a Toeplitz matrix with sensitive eigenvalues.hadamardHadamard matrixhankelHankel matrixhanowaA matrix whose eigenvalues lie on a vertical line in ChilbHilbert matrixinvhessInverse of an upper Hessenberg matrixinvolAn involutory matrixipjfactA Hankel matrix with factorial elementsjordblocJordan block matrixkahanKahan matrix - upper trapezoidalkmsKar-Murdock-Szego Toeplitz matrixkrylovKrylov matrixlauchliLauchli matrix - rectangularlehmerLehmer matrix - symmetric positive definitelespA tridiagonal matrix with real, sensitve eigenvalueslotkinLotkin matrixminijSymmetric positive definite matrix min(i,j)molerMoler matrix symmetric positive definiteneumannSingular matrix from the descrete Neumann problem (sparse)ohessRandom, orthogonal upper Hessenberg matrixparterParter matrix - a Toeplitz matrix with singular values near pipascalPascal matrixpdtoepSymmetric positive definite Toeplitz matrixpeiPei matrixpentoepTentadiagonal Toeplitz matrix (sparse)poissonBlock tridiagonal matrix from Poisson’s equation (sparse)prolateProlate matrix - symmetric, ill-conditioned Toeplitz matrixqmultPre-multiply by random orthogonal matrixrandoRandom matrix with elements -1, 0, or 1randsvdRandom matrix with pre-assigned singular valuesredheffA (0,1) matrix of Redheffer associated with the Riemann hypothesisriemannA matrix associated with the Riemann hypothesissmokeSmoke matrix - complex, with a ‘smoke ring’ pseudospectrumtriwUpper triangular matrix discussed by Wilkinson and otherswathenWathen matrix - a finite element matrix (sparse, random entries)wilkVarious specific matrices devised /discussed by WilkensonwilkinsonWilkinson matrix of size n, where n must be oddSome of generally useful matrix utility functions:augmentAgumented system matrixbandredBand reduction by two-sided unitary transformationscgsClassical Gram-Schmidt QR factorizationcondMatrix condition number in 1,2,Frobenius, or infinity normcondeigCondition numbers for eigenvalues of a matrixcpltaxesDetermine suitable axis for plot of complex vectordualDual vector with respect to Holder p-normfvEvaluate and plot the field of values largest leading submatricesgeGaussian elimination without pivotinggershPlots Gershgorin disks for a square matrixhankelGiven first row, returns a Toeplitz type matrixhouseHouseholder matrixmdsmaxMultidimensional search method for direct search optimizationmgsModified Gram-Schmidt QR factorizationpow2Vector whose i-th element is 2 ** x[i], where x[] is inputpsDot plot of a pseudospectrumpscontPlots contours and color plots of pseudospectrarepmatSimple re-implementation of matlab's repmat functionrqRayleigh quotientskewpartSkew-symmetric (skew-Hermitian) partsparsifyRandomly sets matrix elements to zerosubPrincipal submatrixsymmpartSymmetric (Hermitian) parttoeplitzReturns toeplitz matrix given first row of the matrixtreshapeReshape vector to or from (unit) triangular matrixtridiagSparse tridiagonl matrix given the diagonalsvandVandermonde matrixvecpermVector permutation matrixMore information is available on any of these functions by typinghelp0.5.0 Release NotesDon't use the distribute_setuptools.py stuff for python 2.7.15
Fixed type errors in cycol.py, dorr.py, hanowa.py, ohess.py, and treshape.py that have
developed with newer versions of Python.
Tested on Ubuntu 18.04.1 with Python 2.7.15 & Numpy 1.14.3; Python 3.6.5 & Numpy 1.14.3;
    and Python 3.7.0 and Numpy 1.15.00.4.0 Release NotesAdded visualization routines fv, gersh, and pscont. Fixed issues with np.r_.
Relaxed tolerances for two problematic unit tests. Only use distribute with
Python 2 series.  Cleaned up pep8 warnings.
Tested on Ubuntu 14.04 with Python 3.5.1,  Numpy 1.10.2, Scipy 0.16.1, IPython 4.0.1, Matplotlib 1.5.0
Tested on Ubuntu 14.04 with Python 3.4.3,  Numpy 1.9.3,  Scipy 0.16.0, IPython 4.0.0, Matplotlib 1.4.3
Tested on Ubuntu 14.04 with Python 2.7.10, Numpy 1.9.2,  Scipy 0.15.1, IPython 3.2.1, Matplotlib 1.3.1
Tested on Windows 10   with Python 3.5.1,  Numpy 1.10.1, Scipy 0.16.0, IPython 4.0.0, Matplotlib 1.4.30.3.0 Release NotesPorted to Python 3. Added distribute_setup.py to fix installation problems.
Tested on Ubuntu 12.04 with Python 2.7.3, Numpy 1.6.1, Scipy 0.10.0, IPython 0.12
Tested on Ubuntu 12.04 with Python 3.2.3, Numpy 1.6.2, Scipy 0.11.0, IPython 0.13.1
Tested on Windows 7    with Python 2.7.3, Numpy 1.6.2, Scipy 0.11.0, IPython 0.13.10.2.0 Release NotesUnit tests now included with distribution.