JuliaApprox
Base class for rational function approximations.
Wraps Julia’s AbstractApproximation type, providing methods for evaluating approximations, analyzing their properties, and managing the approximation history.
Attributes
julia
The underlying Julia approximation object.
Methods
check
Check the quality of the approximation.
degree
Get the total degree of the approximation.
degrees
Get the numerator and denominator degrees.
get
Get a property from the underlying Julia object.
isconverged
Check whether the iteration reached the requested tolerance.
isempty
Check if the approximation is empty/undefined.
poles
Compute the poles of the approximation.
residues
Compute poles and their residues.
rewind
Rewind the approximation history by n steps.
roots
Compute the zeros of the approximation.
check
Check the quality of the approximation.
Returns
Approximation quality metrics from Julia.
degree
Get the total degree of the approximation.
Returns
int
Maximum of numerator and denominator degrees.
degrees
Get the numerator and denominator degrees.
Returns
tuple
(numerator_degree, denominator_degree).
get
Get a property from the underlying Julia object.
Parameters
field
Name of the property to retrieve.
required
Returns
The value of the requested property.
isconverged
JuliaApprox.isconverged()
Check whether the iteration reached the requested tolerance.
Returns
bool
True if the approximation stopped by converging, and False if it stagnated, exhausted its degree budget, failed, or recorded no status.
isempty
Check if the approximation is empty/undefined.
Returns
bool
True if the approximation is empty.
poles
Compute the poles of the approximation.
Returns
np.ndarray: Array of pole locations in the complex plane.
residues
Compute poles and their residues.
Returns
tuple
(poles, residues) as numpy arrays.
rewind
Rewind the approximation history by n steps.
Parameters
n
Number of steps to rewind (default: 1).
1
roots
Compute the zeros of the approximation.
Returns
np.ndarray: Array of zero locations in the complex plane.