JuliaApprox

JuliaApprox(julia_obj)

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

Name Type Description
julia The underlying Julia approximation object.

Methods

Name Description
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

JuliaApprox.check()

Check the quality of the approximation.

Returns

Name Type Description
Approximation quality metrics from Julia.

degree

JuliaApprox.degree()

Get the total degree of the approximation.

Returns

Name Type Description
int Maximum of numerator and denominator degrees.

degrees

JuliaApprox.degrees()

Get the numerator and denominator degrees.

Returns

Name Type Description
tuple (numerator_degree, denominator_degree).

get

JuliaApprox.get(field)

Get a property from the underlying Julia object.

Parameters

Name Type Description Default
field Name of the property to retrieve. required

Returns

Name Type Description
The value of the requested property.

isconverged

JuliaApprox.isconverged()

Check whether the iteration reached the requested tolerance.

Returns

Name Type Description
bool True if the approximation stopped by converging, and False if it stagnated, exhausted its degree budget, failed, or recorded no status.

isempty

JuliaApprox.isempty()

Check if the approximation is empty/undefined.

Returns

Name Type Description
bool True if the approximation is empty.

poles

JuliaApprox.poles()

Compute the poles of the approximation.

Returns

Name Type Description
np.ndarray: Array of pole locations in the complex plane.

residues

JuliaApprox.residues()

Compute poles and their residues.

Returns

Name Type Description
tuple (poles, residues) as numpy arrays.

rewind

JuliaApprox.rewind(n=1)

Rewind the approximation history by n steps.

Parameters

Name Type Description Default
n Number of steps to rewind (default: 1). 1

roots

JuliaApprox.roots()

Compute the zeros of the approximation.

Returns

Name Type Description
np.ndarray: Array of zero locations in the complex plane.