freealg.FreeForm.decompress#

FreeForm.decompress(size, x=None, method='newton', max_iter=500, step_size=0.1, tolerance=0.0001, plot=False, latex=False, save=False, plot_diagnostics=False)#

Free decompression of spectral density.

Parameters:
sizeint or array_like

Size(s) of the decompressed matrix. This can be a scalar or an array of sizes. For each matrix size in size array, a density is produced.

xnumpy.array, default=None

Positions where density to be evaluated at. If None, an interval slightly larger than the support interval will be used.

method{'newton', 'secant'}, default= 'newton'

Root-finding method.

max_iter: int, default=500

Maximum number of root-finding method iterations.

step_size: float, default=0.1

Step size for Newton iterations.

tolerance: float, default=1e-4

Tolerance for the solution obtained by the Newton solver. Also used for the finite difference approximation to the derivative.

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.

plot_diagnosticsbool, default=False

Plots diagnostics including convergence and number of iterations of root finding method.

Returns:
rhonumpy.array or numpy.ndarray

Estimated spectral density at locations x. rho can be a 1D or 2D array output:

  • If size is a scalar, rho is a 1D array od the same size as x.

  • If size is an array of size n, rho is a 2D array with n rows, where each row corresponds to decompression to a size. Number of columns of rho is the same as the size of x.

xnumpy.array

Locations where the spectral density is estimated

See also

density
stieltjes

Notes

Work in progress.

References

[1]

tbd

Examples

>>> from freealg import FreeForm