Skip to content

Commit 41284dc

Browse files
committed
docs(matrices): update matrices doc
1 parent 14dae1c commit 41284dc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+154
-265
lines changed

Diff for: src/matrices/binomial.jl

+3-5
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@ Binomial Matrix
33
===============
44
The matrix is a multiple of an involutory matrix.
55
6-
*Input options:*
7-
8-
+ dim: the dimension of the matrix.
9-
10-
*References:*
6+
# Input Options
7+
- dim: the dimension of the matrix.
118
9+
# References
1210
**G. Boyd, C.A. Micchelli, G. Strang and D.X. Zhou**,
1311
Binomial matrices, Adv. in Comput. Math., 14 (2001), pp 379-391.
1412
"""

Diff for: src/matrices/cauchy.jl

+6-11
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,13 @@ Cauchy Matrix
44
Given two vectors `x` and `y`, the `(i,j)` entry of the Cauchy matrix is
55
`1/(x[i]+y[j])`.
66
7-
*Input options*:
8-
9-
+ x: an integer, as vectors 1:x and 1:x.
10-
11-
+ x, y: two integers, as vectors 1:x and 1:y.
12-
13-
+ x: a vector. `y` defaults to `x`.
14-
15-
+ x, y: two vectors.
16-
17-
*References:*
7+
# Input Options
8+
- x: an integer, as vectors 1:x and 1:x.
9+
- x, y: two integers, as vectors 1:x and 1:y.
10+
- x: a vector. `y` defaults to `x`.
11+
- x, y: two vectors.
1812
13+
# References
1914
**N. J. Higham**, Accuracy and Stability of Numerical Algorithms,
2015
second edition, Society for Industrial and Applied Mathematics, Philadelphia, PA, USA,
2116
2002; sec. 28.1

Diff for: src/matrices/chebspec.jl

+4-7
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,12 @@ If `k = 0`,the generated matrix is nilpotent and a vector with
66
matrix is nonsingular and well-conditioned. Its eigenvalues
77
have negative real parts.
88
9-
*Input options:*
10-
11-
+ dim, k: `dim` is the dimension of the matrix and
9+
# Input Options
10+
- dim, k: `dim` is the dimension of the matrix and
1211
`k = 0 or 1`.
12+
- dim: `k=0`.
1313
14-
+ dim: `k=0`.
15-
16-
*References:*
17-
14+
# References
1815
**L. N. Trefethen and M. R. Trummer**, An instability
1916
phenomenon in spectral methods, SIAM J. Numer. Anal., 24 (1987), pp. 1008-1023.
2017
"""

Diff for: src/matrices/chow.jl

+4-7
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,13 @@ Chow Matrix
33
===========
44
The Chow matrix is a singular Toeplitz lower Hessenberg matrix.
55
6-
*Input options:*
7-
8-
+ dim, alpha, delta: `dim` is dimension of the matrix.
6+
# Input Options
7+
- dim, alpha, delta: `dim` is dimension of the matrix.
98
`alpha`, `delta` are scalars such that `A[i,i] = alpha + delta` and
109
`A[i,j] = alpha^(i + 1 -j)` for `j + 1 <= i`.
10+
- dim: `alpha = 1`, `delta = 0`.
1111
12-
+ dim: `alpha = 1`, `delta = 0`.
13-
14-
*References:*
15-
12+
# References
1613
**T. S. Chow**, A class of Hessenberg matrices with known
1714
eigenvalues and inverses, SIAM Review, 11 (1969), pp. 391-395.
1815
"""

Diff for: src/matrices/circulant.jl

+4-7
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@ A circulant matrix has the property that each row is obtained
55
by cyclically permuting the entries of the previous row one
66
step forward.
77
8-
*Input options:*
9-
10-
+ vec: a vector.
11-
12-
+ dim: an integer, as vector 1:dim.
13-
14-
*References:*
8+
# Input Options
9+
- vec: a vector.
10+
- dim: an integer, as vector 1:dim.
1511
12+
# References
1613
**P. J. Davis**, Circulant Matrices, John Wiley, 1977.
1714
"""
1815
struct Circulant{T<:Number} <: AbstractMatrix{T}

Diff for: src/matrices/clement.jl

+4-7
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,13 @@ Clement Matrix
44
The Clement matrix is a tridiagonal matrix with zero
55
diagonal entries. If k = 1, the matrix is symmetric.
66
7-
*Input options:*
8-
9-
+ dim, k: `dim` is the dimension of the matrix.
7+
# Input Options
8+
- dim, k: `dim` is the dimension of the matrix.
109
If `k = 0`, the matrix is of type `Tridiagonal`.
1110
If `k = 1`, the matrix is of type `SymTridiagonal`.
11+
- dim: `k = 0`.
1212
13-
+ dim: `k = 0`.
14-
15-
*References:*
16-
13+
# References
1714
**P. A. Clement**, A class of triple-diagonal
1815
matrices for test purposes, SIAM Review, 1 (1959), pp. 50-52.
1916
"""

Diff for: src/matrices/companion.jl

+4-7
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,10 @@ The companion matrix to a monic polynomial
88
is the n-by-n matrix with ones on the subdiagonal and
99
the last column given by the coefficients of `a(x)`.
1010
11-
*Input options:*
12-
13-
+ vec: `vec` is a vector of coefficients.
14-
15-
+ dim: `vec = [1:dim;]`. `dim` is the dimension of the matrix.
16-
17-
+ polynomial: `polynomial` is a polynomial. vector will be appropriate values from coefficients.
11+
# Input Options
12+
- vec: `vec` is a vector of coefficients.
13+
- dim: `vec = [1:dim;]`. `dim` is the dimension of the matrix.
14+
- polynomial: `polynomial` is a polynomial. vector will be appropriate values from coefficients.
1815
"""
1916
struct Companion{T<:Number} <: AbstractMatrix{T}
2017
n::Integer

Diff for: src/matrices/dingdong.jl

+3-5
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ The Dingdong matrix is a symmetric Hankel matrix invented
55
by DR. F. N. Ris of IBM, Thomas J Watson Research Centre.
66
The eigenvalues cluster around `π/2` and `-π/2`.
77
8-
*Input options:*
9-
10-
+ dim: the dimension of the matrix.
11-
12-
*References:*
8+
# Input Options
9+
- dim: the dimension of the matrix.
1310
11+
# References
1412
**J. C. Nash**, Compact Numerical Methods for
1513
Computers: Linear Algebra and Function Minimisation,
1614
second edition, Adam Hilger, Bristol, 1990 (Appendix 1).

Diff for: src/matrices/fiedler.jl

+4-7
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@ Fiedler Matrix
44
The Fiedler matrix is symmetric matrix with a dominant
55
positive eigenvalue and all the other eigenvalues are negative.
66
7-
*Input options:*
8-
9-
+ vec: a vector.
10-
11-
+ dim: `dim` is the dimension of the matrix. `vec=[1:dim;]`.
12-
13-
*References:*
7+
# Input Options
8+
- vec: a vector.
9+
- dim: `dim` is the dimension of the matrix. `vec=[1:dim;]`.
1410
11+
# References
1512
**G. Szego**, Solution to problem 3705, Amer. Math.
1613
Monthly, 43 (1936), pp. 246-259.
1714

Diff for: src/matrices/forsythe.jl

+3-5
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@ Forsythe Matrix
44
The Forsythe matrix is a n-by-n perturbed Jordan block.
55
This generator is adapted from N. J. Higham's Test Matrix Toolbox.
66
7-
*Input options:*
8-
9-
+ dim, alpha, lambda: `dim` is the dimension of the matrix.
7+
# Input Options
8+
- dim, alpha, lambda: `dim` is the dimension of the matrix.
109
`alpha` and `lambda` are scalars.
11-
12-
+ dim: `alpha = sqrt(eps(type))` and `lambda = 0`.
10+
- dim: `alpha = sqrt(eps(type))` and `lambda = 0`.
1311
"""
1412
struct Forsythe{T<:Number} <: AbstractMatrix{T}
1513
n::Integer

Diff for: src/matrices/frank.jl

+4-7
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,12 @@ The Frank matrix is an upper Hessenberg matrix with
55
determinant 1. The eigenvalues are real, positive and
66
very ill conditioned.
77
8-
*Input options:*
9-
10-
+ dim, k: `dim` is the dimension of the matrix, `k = 0 or 1`.
8+
# Input Options
9+
- dim, k: `dim` is the dimension of the matrix, `k = 0 or 1`.
1110
If `k = 1` the matrix reflect about the anti-diagonal.
11+
- dim: the dimension of the matrix.
1212
13-
+ dim: the dimension of the matrix.
14-
15-
*References:*
16-
13+
# References
1714
**W. L. Frank**, Computing eigenvalues of complex matrices
1815
by determinant evaluation and by methods of Danilewski and Wielandt,
1916
J. Soc. Indust. Appl. Math., 6 (1958), pp. 378-392 (see pp. 385, 388).

Diff for: src/matrices/golub.jl

+3-5
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ Golub matrix is the product of two random unit lower and upper
55
triangular matrices respectively. LU factorization without pivoting
66
fails to reveal that such matrices are badly conditioned.
77
8-
*Input options:*
9-
10-
+ dim: the dimension of the matrix.
11-
12-
*References:*
8+
# Input Options
9+
- dim: the dimension of the matrix.
1310
11+
# References
1412
**D. Viswanath and N. Trefethen**. Condition Numbers of
1513
Random Triangular Matrices, SIAM J. Matrix Anal. Appl. 19, 564-581,
1614
1998.

Diff for: src/matrices/grcar.jl

+4-7
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@ Grcar Matrix
44
The Grcar matrix is a Toeplitz matrix with sensitive
55
eigenvalues.
66
7-
*Input options:*
8-
9-
+ dim, k: `dim` is the dimension of the matrix and
7+
# Input Options
8+
- dim, k: `dim` is the dimension of the matrix and
109
`k` is the number of superdiagonals.
10+
- dim: the dimension of the matrix.
1111
12-
+ dim: the dimension of the matrix.
13-
14-
*References:*
15-
12+
# References
1613
**J. F. Grcar**, Operator coefficient methods
1714
for linear equations, Report SAND89-8691, Sandia National
1815
Laboratories, Albuquerque, New Mexico, 1989 (Appendix 2).

Diff for: src/matrices/hadamard.jl

+3-5
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ The Hadamard matrix is a square matrix whose entries are
55
1 or -1. It was named after Jacques Hadamard. The rows of
66
a Hadamard matrix are orthogonal.
77
8-
*Input options:*
9-
10-
+ dim: the dimension of the matrix, `dim` is a power of 2.
11-
12-
*References:*
8+
# Input Options
9+
- dim: the dimension of the matrix, `dim` is a power of 2.
1310
11+
# References
1412
**S. W. Golomb and L. D. Baumert**, The search for
1513
Hadamard matrices, Amer. Math. Monthly, 70 (1963) pp. 12-17
1614
"""

Diff for: src/matrices/hankel.jl

+4-7
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@ Hankel Matrix
44
A Hankel matrix is a matrix that is symmetric and constant
55
across the anti-diagonals.
66
7-
*Input options:*
8-
9-
+ vc, vr: `vc` and `vc` are the first column and last row of the
7+
# Input Options
8+
- vc, vr: `vc` and `vc` are the first column and last row of the
109
matrix. If the last element of `vc` differs from the first element
1110
of `vr`, the last element of `rc` prevails.
12-
13-
+ v: a vector, as `vc = v` and `vr` will be zeros.
14-
15-
+ dim: `dim` is the dimension of the matrix. `v = [1:dim;]`.
11+
- v: a vector, as `vc = v` and `vr` will be zeros.
12+
- dim: `dim` is the dimension of the matrix. `v = [1:dim;]`.
1613
"""
1714
struct Hankel{T<:Number} <: AbstractMatrix{T}
1815
m::Integer

Diff for: src/matrices/hilbert.jl

+4-7
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,11 @@ The Hilbert matrix has `(i,j)` element `1/(i+j-1)`. It is
55
notorious for being ill conditioned. It is symmetric
66
positive definite and totally positive.
77
8-
*Input options:*
9-
10-
+ dim: the dimension of the matrix.
11-
12-
+ row\\_dim, col\\_dim: the row and column dimensions.
13-
14-
*References:*
8+
# Input Options
9+
- dim: the dimension of the matrix.
10+
- row\\_dim, col\\_dim: the row and column dimensions.
1511
12+
# References
1613
**M. D. Choi**, Tricks or treats with the Hilbert matrix,
1714
Amer. Math. Monthly, 90 (1983), pp. 301-312.
1815

Diff for: src/matrices/inversehilbert.jl

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
"""
22
Inverse of the Hilbert Matrix
33
=============================
4-
*Input options:*
54
6-
+ dim: the dimension of the matrix.
7-
8-
*References:*
5+
# Input Options
6+
- dim: the dimension of the matrix.
97
8+
# References
109
**M. D. Choi**, Tricks or treats with the Hilbert matrix,
1110
Amer. Math. Monthly, 90 (1983), pp. 301-312.
1211

Diff for: src/matrices/involutory.jl

+3-5
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@ Involutory Matrix
33
=================
44
An involutory matrix is a matrix that is its own inverse.
55
6-
*Input options:*
7-
8-
+ dim: `dim` is the dimension of the matrix.
9-
10-
*References:*
6+
# Input Options
7+
- dim: `dim` is the dimension of the matrix.
118
9+
# References
1210
**A. S. Householder and J. A. Carpenter**, The
1311
singular values of involutory and of idempotent matrices,
1412
Numer. Math. 5 (1963), pp. 234-237.

Diff for: src/matrices/kahan.jl

+5-9
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,13 @@ The Kahan matrix is an upper trapezoidal matrix, i.e., the
66
`θ` is `0 < θ < π`. The diagonal is perturbed by
77
`pert*eps()*diagm([n:-1:1;])`.
88
9-
*Input options:*
10-
11-
+ rowdim, coldim, θ, pert: `rowdim` and `coldim` are the row and column
9+
# Input Options
10+
- rowdim, coldim, θ, pert: `rowdim` and `coldim` are the row and column
1211
dimensions of the matrix. `θ` and `pert` are scalars.
12+
- dim, θ, pert: `dim` is the dimension of the matrix.
13+
- dim: `θ = 1.2`, `pert = 25`.
1314
14-
+ dim, θ, pert: `dim` is the dimension of the matrix.
15-
16-
+ dim: `θ = 1.2`, `pert = 25`.
17-
18-
*References:*
19-
15+
# References
2016
**W. Kahan**, Numerical linear algebra, Canadian Math.
2117
Bulletin, 9 (1966), pp. 757-801.
2218
"""

Diff for: src/matrices/kms.jl

+4-7
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,12 @@
22
Kac-Murdock-Szego Toeplitz matrix
33
=================================
44
5-
*Input options:*
6-
7-
+ dim, rho: `dim` is the dimension of the matrix, `rho` is a
5+
# Input Options
6+
- dim, rho: `dim` is the dimension of the matrix, `rho` is a
87
scalar such that `A[i,j] = rho^(abs(i-j))`.
8+
- dim: `rho = 0.5`.
99
10-
+ dim: `rho = 0.5`.
11-
12-
*References:*
13-
10+
# References
1411
**W. F. Trench**, Numerical solution of the eigenvalue
1512
problem for Hermitian Toeplitz matrices, SIAM J. Matrix Analysis
1613
and Appl., 10 (1989), pp. 135-146 (and see the references therein).

Diff for: src/matrices/lehmer.jl

+3-5
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ The Lehmer matrix is a symmetric positive definite matrix.
55
It is totally nonnegative. The inverse is tridiagonal and
66
explicitly known
77
8-
*Input options:*
9-
10-
+ dim: the dimension of the matrix.
11-
12-
*References:*
8+
# Input Options
9+
- dim: the dimension of the matrix.
1310
11+
# References
1412
**M. Newman and J. Todd**, The evaluation of
1513
matrix inversion programs, J. Soc. Indust. Appl. Math.,
1614
6 (1958), pp. 466-476.

0 commit comments

Comments
 (0)