sparsax.solve_factor¶
-
sparsax.solve_factor(token, b, mode=
0)[source]¶ Solve
A x = busing a pre-computed factor (no refactor).Reuses the numeric factor held in
token(fromfactor()); costsO(nnz(L) * n_rhs)triangular solves, no factorization. The factor is not consumed — callsolve_factor()as many times as needed against the same token.Not differentiable. Use
solve()when gradients are needed.Note
Under
jax.vmap,vmap(solve_factor, in_axes=(None, 0))reuses one factor across a batch of RHS — the key Krylov-recurrence shape (one factor,m+1solves), run as one multi-column solve.vmap(factor)followed byvmap(solve_factor)(both batched) produces one factor per batch element, matchingfactor_solve()’s batch semantics. The two nest in either order, as one native call.