freealg.distributions.DeformedMarchenkoPastur.density#

DeformedMarchenkoPastur.density(x=None, eta=0.001, ac_only=True, plot=False, latex=False, save=False, eig=None)#

Density of distribution.

Parameters:
xnumpy.array, default=None

The locations where density is evaluated at. If None, an interval slightly larger than the supp interval of the spectral density is used.

rhonumpy.array, default=None

Density. If None, it will be computed.

etafloat, default=1e-3

The offset \(\eta\) from the real axis where the density is evaluated using Plemelj formula at \(z = x + i \eta\).

ac_onlybool, default=True

If True, it returns the absolutely-continuous part of density.

plotbool, default=False

If True, density is plotted.

latexbool, default=False

If True, the plot is rendered using LaTeX. This option is relevant only if plot=True.

savebool, default=False

If not False, the plot is saved. If a string is given, it is assumed to the save filename (with the file extension). This option is relevant only if plot=True.

eignumpy.array, default=None

A collection of eigenvalues to compare to via histogram. This option is relevant only if plot=True.

Returns:
rhonumpy.array

Density.

Notes

  • Do not warm-start across x<0 (MP-type support is >=0).

  • Reset warm-start when previous u is (nearly) real.

  • If Newton lands on a non-Herglotz root, fall back to polynomial roots and pick.

If ac_only is True and c < 1, subtract the smeared atom at zero of mass (1-c) for visualization.