Skip to content

Commit 18b33bb

Browse files
committed
First attempt at proper documentation
1 parent 619c9e0 commit 18b33bb

File tree

3 files changed

+78
-5
lines changed

3 files changed

+78
-5
lines changed

README.md

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,76 @@
11
RandomMatrices.jl
22
=================
33

4-
Random matrix theory repository for Julia
4+
Random matrix repository for Julia
5+
6+
# Gaussian matrix ensembles
7+
8+
## Joint probability density functions (jpdfs)
9+
10+
Given eigenvalues `lambda` and the `beta` parameter of the random matrix distribution:
11+
12+
- `VandermondeDeterminant(lambda, beta)` computes the Vandermonde determinant
13+
- `HermiteJPDF(lambda, beta)` computes the jpdf for the Hermite ensemble
14+
- `LaguerreJPDF(lambda, n, beta)` computes the jpdf for the Laguerre(n) ensemble
15+
- `JacobiJPDF(lambda, n1, n2, beta)` computes the jpdf for the Jacobi(n1, n2) ensemble
16+
17+
## Matrix samples
18+
19+
Constructs samples of random matrices corresponding to the classical Gaussian
20+
Hermite, Laguerre(m) and Jacobi(m1, m2) ensembles.
21+
22+
- `GaussianHermiteMatrix(n, beta)`, `GaussianLaguerreMatrix(n, m, beta)`,
23+
`GaussianJacobiMatrix(n, m1, m2, beta)`
24+
each construct a sample dense `n`x`n` matrix for the corresponding matrix ensemble with `beta=1,2,4`
25+
- `GaussianHermiteTridiagonalMatrix(n, beta)`, `GaussianLaguerreTridiagonalMatrix(n, m, beta)`,
26+
`GaussianJacobiSparseMatrix(n, m1, m2, beta)` each construct a sparse `n`x`n` matrix for the
27+
corresponding matrix ensemble for arbitrary positive finite `beta`
28+
- `GaussianHermiteSamples(n, beta)`, `GaussianLaguerreSamples(n, m, beta)`,
29+
`GaussianJacobiSamples(n, m1, m2, beta)` return a set of `n` eigenvalues from the previous sampled
30+
random matrices
31+
32+
(Note the parameters of the Laguerre and Jacobi ensembles are not yet defined consistently.
33+
For the first set they are integers but for the rest they are reals.)
34+
35+
# Formal power series
36+
37+
Allows for manipulations of formal power series (fps) and formal Laurent series.
38+
39+
This defines the new types
40+
- `FormalPowerSeries`: power series with coefficients allowed only for non-negative integer powers
41+
- `FormalLaurentSeries`: power series with coefficients allowed for all integer powers
42+
43+
## FormalPowerSeries
44+
45+
In addition to basic arithmetic operations `==`, `+`, `-`, `^`, this also provides:
46+
47+
- `tovector` returns the series coefficients
48+
- `trim` removes extraneous zeroes
49+
- `*` computes the Cauchy product (discrete convolution)
50+
- `.*` computes the Hadamard product (elementwise multiplication)
51+
- `isunit(P)` determines if `P` is a unit series
52+
- `isnonunit(P)` determines if `P` is a non-unit series
53+
- `MatrixForm(P)` returns a matrix representation of `P` as an upper triangular Toeplitz matrix
54+
- `reciprocal` computes the series reciprocal
55+
- `derivative` computes the series derivative
56+
- `isconstant(P)` determines if `P` is a constant series
57+
- `compose(P,Q)` computes the series composition P.Q
58+
- `isalmostunit(P)` determines if `P` is an almost unit series
59+
60+
# Densities
61+
62+
Famous distributions in random matrix theory
63+
64+
- `Semicircle` provides the semicircle distribution
65+
- `TracyWidom` computes the Tracy-Widom density distribution by brute-force integration of the Painlevé II equation
66+
67+
# Utility functions
68+
69+
- `hist_eig` computes the histogram of eigenvalues of a matrix using the method of Sturm sequences.
70+
For `SymTridiagonal` matrices this is significantly faster than `hist(eigvals())`
71+
72+
# References
73+
- James Albrecht, Cy Chan, and Alan Edelman, "Sturm Sequences and Random Eigenvalue Distributions", *Foundations of Computational Mathematics*, vol. 9 iss. 4 (2009), pp 461-483. [[pdf]](www-math.mit.edu/~edelman/homepage/papers/sturm.pdf) [[doi]](http://dx.doi.org/10.1007/s10208-008-9037-x)
74+
- Alan Edelman and Brian D. Sutton, "The beta-Jacobi matrix model, the CS decomposition, and generalized singular value problems", *Foundations of Computational Mathematics*, vol. 8 iss. 2 (2008), pp 259-285. [[pdf]](http://www-math.mit.edu/~edelman/homepage/papers/betajacobi.pdf) [[doi]](http://dx.doi.org/10.1007/s10208-006-0215-9)
75+
- Peter Henrici, *Applied and Computational Complex Analysis, Volume I: Power Series---Integration---Conformal Mapping---Location of Zeros*, Wiley-Interscience: New York, 1974
76+

REQUIRE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
Catalan
12
Distributions
23

src/GaussianEnsembleDistributions.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export VandermondeDeterminant, HermiteJPDF, LaguerreJPDF, JacobiJPDF
1616
#
1717

1818
#Calculate Vandermonde determinant term
19-
function VandermondeDeterminant{Eigenvalue<:FloatingPoint}(lambda :: Vector{Eigenvalue}, beta :: Unsigned)
19+
function VandermondeDeterminant{Eigenvalue<:Number}(lambda::Vector{Eigenvalue}, beta::Real)
2020
n = length(lambda)
2121
Vandermonde = 1.0
2222
for j=1:n
@@ -27,7 +27,7 @@ function VandermondeDeterminant{Eigenvalue<:FloatingPoint}(lambda :: Vector{Eige
2727
return Vandermonde
2828
end
2929

30-
function HermiteJPDF{Eigenvalue<:FloatingPoint}(lambda :: Vector{Eigenvalue}, beta :: Unsigned)
30+
function HermiteJPDF{Eigenvalue<:Number}(lambda::Vector{Eigenvalue}, beta::Real)
3131
n = length(lambda)
3232
#Calculate normalization constant
3333
c = (2pi)^(-n/2)
@@ -44,7 +44,7 @@ end
4444

4545

4646
#TODO Check m and ns
47-
function LaguerreJPDF{Eigenvalue<:FloatingPoint}(lambda :: Vector{Eigenvalue}, n :: Unsigned, beta :: Unsigned)
47+
function LaguerreJPDF{Eigenvalue<:Number}(lambda::Vector{Eigenvalue}, n::Unsigned, beta::Real)
4848
m = length(lambda)
4949
#Laguerre parameters
5050
a = beta*n/2.0
@@ -71,7 +71,7 @@ end
7171

7272

7373
#TODO Check m and ns
74-
function JacobiJPDF{Eigenvalue<:FloatingPoint}(lambda :: Vector{Eigenvalue}, n1 :: Unsigned, n2 :: Unsigned, beta :: Unsigned)
74+
function JacobiJPDF{Eigenvalue<:Number}(lambda::Vector{Eigenvalue}, n1::Unsigned, n2::Unsigned, beta::Real)
7575
m = length(lambda)
7676
#Jacobi parameters
7777
a1 = beta*n1/2.0

0 commit comments

Comments
 (0)