sparsax.lu_logdet_factor¶
- sparsax.lu_logdet_factor(token)[source]¶
Return
log|det(A)|from a pre-computed KLU factor (no refactor).Reads the
Udiagonal from the factor held intoken(fromlu_factor`());O(n)cost. Not differentiable.- Parameters:¶
- token¶
Factorfromlu_factor().
- Returns:¶
Scalar float64
log(abs(det(A))).
Note
The logdet is computed from the held factor’s
Udiagonal at call time (no caching on the token, since KLU factors are shared objects). Undervmapover a batch of tokens it routes to the batched handler (one logdet per chain).