Solver¤
Root Solver¤
microlux.polynomial_solver.Aberth_Ehrlich(coff: jnp.ndarray, roots: jnp.ndarray, MAX_ITER: int = 50) -> jnp.ndarray
¤
Solves a polynomial equation using the Aberth-Ehrlich method. Adapted from https://github.com/afoures/aberth-method.
Use jax.lax.custom_root
to get precise derivative in automatic differentiation.
Parameters:
coff
: Coefficients of the polynomial equation.roots
: Initial guesses for the roots of the polynomial equation.MAX_ITER
: Maximum number of iterations. Defaults to 100.
Returns:
roots
: The roots of the polynomial equation.
linear_sum_assignment solver¤
microlux.linear_sum_assignment.solve(cost)
¤
Solves the linear sum assignment problem using the Hungarian algorithm. Adapted from https://github.com/google/jax/issues/10403
Parameters:
- cost
: The cost matrix representing the assignment problem.
Returns:
row_ind
: The row indices of the assigned elements.col_ind
: The column indices of the assigned elements.