Versions in this module Expand all Collapse all v0 v0.8.0 Jul 19, 2026 Changes in this version + const BetaOrthogonal + const BetaSymplectic + const BetaUnitary + var ErrDimensionMismatch = errors.New("randommatrix: dimension mismatch") + var ErrNotSquare = errors.New("randommatrix: matrix is not square") + var ErrNotSymmetric = errors.New("randommatrix: matrix is not symmetric") + func BinomialBig(n, k int) *big.Int + func BinomialCoefficient(n, k int) float64 + func CatalanBig(n int) *big.Int + func CatalanNumber(n int) float64 + func CentralSpectralMoment(eigs []float64, k int) float64 + func ConditionNumberSymmetric(m *Matrix) (float64, error) + func ConsecutiveSpacingRatios(eigs []float64) []float64 + func DeterminantSymmetric(m *Matrix) (float64, error) + func EigenvaluesHermitian(m *CMatrix) ([]float64, error) + func EigenvaluesSymmetric(m *Matrix) ([]float64, error) + func EmpiricalCDF(data []float64, x float64) float64 + func EmpiricalCauchy(eigs []float64, z complex128) complex128 + func EmpiricalStieltjes(eigs []float64, z complex128) complex128 + func FactorialBig(n int) *big.Int + func FreeConvolutionMoments(momentsA, momentsB []float64) []float64 + func FreeConvolutionSemicircleRadius(r1, r2 float64) float64 + func FreeConvolutionSemicircleVariance(var1, var2 float64) float64 + func FreeCumulantsFromMoments(moments []float64) []float64 + func GOEMeanRatio() float64 + func GOESpacingCDF(s float64) float64 + func GOESpacingDensity(s float64) float64 + func GSEMeanRatio() float64 + func GSESpacingCDF(s float64) float64 + func GSESpacingDensity(s float64) float64 + func GUEMeanRatio() float64 + func GUESpacingCDF(s float64) float64 + func GUESpacingDensity(s float64) float64 + func GaussianVector(n int, mean, std float64, seed int64) []float64 + func KolmogorovSmirnovStatistic(data []float64, cdf func(float64) float64) float64 + func LargestEigenvalue(m *Matrix) (float64, error) + func MarchenkoPasturAtomMass(c float64) float64 + func MarchenkoPasturCDF(x, c, sigma2 float64) float64 + func MarchenkoPasturDensity(x, c, sigma2 float64) float64 + func MarchenkoPasturHasAtom(c float64) bool + func MarchenkoPasturMean(c, sigma2 float64) float64 + func MarchenkoPasturMoment(k int, c, sigma2 float64) float64 + func MarchenkoPasturStieltjes(z complex128, c float64) complex128 + func MarchenkoPasturSupport(c, sigma2 float64) (lo, hi float64) + func MarchenkoPasturVariance(c, sigma2 float64) float64 + func Max(xs []float64) float64 + func Mean(xs []float64) float64 + func MeanConsecutiveRatio(eigs []float64) float64 + func MeanSpacing(eigs []float64) float64 + func Min(xs []float64) float64 + func MomentsFromFreeCumulants(kappa []float64) []float64 + func NearestNeighbourSpacings(eigs []float64) []float64 + func NonCrossingPartitionsCount(n int) float64 + func NormalizedSpacings(eigs []float64) []float64 + func PoissonMeanRatio() float64 + func PoissonRatioDensity(r float64) float64 + func PoissonSpacingCDF(s float64) float64 + func PoissonSpacingDensity(s float64) float64 + func RTransformSeries(kappa []float64) []float64 + func RatioSurmiseDensity(r, beta float64) float64 + func RescaleLargestEigenvalue(lambdaMax float64, n int) float64 + func SampleGOE(n int, seed int64, scale float64) ([]float64, error) + func SampleGUE(n int, seed int64, scale float64) ([]float64, error) + func SampleWishartReal(n, p int, seed int64) ([]float64, error) + func SemicircleCDF(x, radius float64) float64 + func SemicircleDensity(x, radius float64) float64 + func SemicircleFreeCumulants(variance float64, N int) []float64 + func SemicircleMoment(k int, radius float64) float64 + func SemicirclePeak(radius float64) float64 + func SemicircleRadius(variance float64) float64 + func SemicircleStieltjes(z complex128, radius float64) complex128 + func SemicircleSupport(radius float64) (lo, hi float64) + func SemicircleVariance(radius float64) float64 + func SmallestEigenvalue(m *Matrix) (float64, error) + func SortSpacings(spacings []float64) []float64 + func SortedCopy(xs []float64) []float64 + func SpacingRatios(eigs []float64) []float64 + func SpectralGaps(eigs []float64) []float64 + func SpectralMean(eigs []float64) float64 + func SpectralMoment(eigs []float64, k int) float64 + func SpectralMoments(eigs []float64, kmax int) []float64 + func SpectralQuantile(eigs []float64, q float64) float64 + func SpectralRadius(m *Matrix) (float64, error) + func SpectralVariance(eigs []float64) float64 + func TracyWidomApproxParams(beta int) (k, theta, shift float64, ok bool) + func TracyWidomCDF(s float64, beta int) float64 + func TracyWidomDensity(s float64, beta int) float64 + func TracyWidomEdgeCenter(n int) float64 + func TracyWidomEdgeScale(n int) float64 + func TracyWidomExcessKurtosis(beta int) float64 + func TracyWidomMean(beta int) float64 + func TracyWidomSkewness(beta int) float64 + func TracyWidomStdDev(beta int) float64 + func TracyWidomSupportedBeta(beta int) bool + func TracyWidomVariance(beta int) float64 + func Unfold(eigs []float64, cdf func(float64) float64) []float64 + func UnfoldedSpacings(eigs []float64, cdf func(float64) float64) []float64 + func WignerSurmise(s, beta float64) float64 + func WignerSurmiseCDF(s, beta float64) float64 + func WishartTracyWidomCenter(n, p int) float64 + func WishartTracyWidomScale(n, p int) float64 + type CMatrix struct + func CIdentity(n int) *CMatrix + func GSE(n int, seed int64) *CMatrix + func GUE(n int, seed int64) *CMatrix + func GaussianCMatrix(rows, cols int, std float64, seed int64) *CMatrix + func GinibreComplex(n int, seed int64) *CMatrix + func LaguerreUnitary(n, p int, seed int64) *CMatrix + func NewCMatrix(rows, cols int) *CMatrix + func NewCMatrixFrom(rows, cols int, data []complex128) *CMatrix + func WishartComplex(n, p int, seed int64) *CMatrix + func (m *CMatrix) At(i, j int) complex128 + func (m *CMatrix) Clone() *CMatrix + func (m *CMatrix) Cols() int + func (m *CMatrix) ConjugateTranspose() *CMatrix + func (m *CMatrix) FrobeniusNorm() float64 + func (m *CMatrix) Hermitianize() *CMatrix + func (m *CMatrix) ImagPart() *Matrix + func (m *CMatrix) IsHermitian(tol float64) bool + func (m *CMatrix) IsSquare() bool + func (m *CMatrix) Minus(other *CMatrix) (*CMatrix, error) + func (m *CMatrix) Mul(other *CMatrix) (*CMatrix, error) + func (m *CMatrix) Plus(other *CMatrix) (*CMatrix, error) + func (m *CMatrix) RealPart() *Matrix + func (m *CMatrix) Rows() int + func (m *CMatrix) Scale(s complex128) *CMatrix + func (m *CMatrix) Set(i, j int, v complex128) + func (m *CMatrix) Trace() complex128 + type EigenSym struct + Values []float64 + Vectors *Matrix + func EigSymmetric(m *Matrix) (*EigenSym, error) + type Histogram struct + Counts []int + Edges []float64 + Total int + func EmpiricalSpectralDensity(eigs []float64, bins int) *Histogram + func NewHistogram(data []float64, bins int, lo, hi float64) *Histogram + func NewHistogramAuto(data []float64, bins int) *Histogram + func (h *Histogram) BinCenters() []float64 + func (h *Histogram) BinWidth() float64 + func (h *Histogram) Density() []float64 + func (h *Histogram) ModeBin() int + func (h *Histogram) NumBins() int + func (h *Histogram) Probabilities() []float64 + type Matrix struct + func Diag(d []float64) *Matrix + func GOE(n int, seed int64) *Matrix + func GaussianMatrix(rows, cols int, mean, std float64, seed int64) *Matrix + func GinibreReal(n int, seed int64) *Matrix + func Identity(n int) *Matrix + func LaguerreOrthogonal(n, p int, seed int64) *Matrix + func NewMatrix(rows, cols int) *Matrix + func NewMatrixFrom(rows, cols int, data []float64) *Matrix + func NewMatrixFromRows(rows [][]float64) *Matrix + func SampleCovarianceReal(n, p int, seed int64) *Matrix + func WignerMatrix(n int, offStd, diagStd float64, seed int64) *Matrix + func WishartReal(n, p int, seed int64) *Matrix + func Zeros(rows, cols int) *Matrix + func (m *Matrix) Add(i, j int, v float64) + func (m *Matrix) At(i, j int) float64 + func (m *Matrix) Clone() *Matrix + func (m *Matrix) Col(j int) []float64 + func (m *Matrix) Cols() int + func (m *Matrix) Data() []float64 + func (m *Matrix) Diagonal() []float64 + func (m *Matrix) Equals(other *Matrix, tol float64) bool + func (m *Matrix) FrobeniusNorm() float64 + func (m *Matrix) IsSquare() bool + func (m *Matrix) IsSymmetric(tol float64) bool + func (m *Matrix) MaxAbs() float64 + func (m *Matrix) Minus(other *Matrix) (*Matrix, error) + func (m *Matrix) Mul(other *Matrix) (*Matrix, error) + func (m *Matrix) MulVec(v []float64) ([]float64, error) + func (m *Matrix) Plus(other *Matrix) (*Matrix, error) + func (m *Matrix) Row(i int) []float64 + func (m *Matrix) Rows() int + func (m *Matrix) Scale(s float64) *Matrix + func (m *Matrix) Set(i, j int, v float64) + func (m *Matrix) String() string + func (m *Matrix) SubMatrix(r0, r1, c0, c1 int) *Matrix + func (m *Matrix) Symmetrize() *Matrix + func (m *Matrix) Trace() float64 + func (m *Matrix) Transpose() *Matrix