sparsax.logdet_factor

sparsax.logdet_factor(token)[source]

Return log|A| from a pre-computed factor (no refactor).

Reads the Cholesky diagonal from the factor held in token (from factor()); O(n) cost. Not differentiable.

Parameters:
token

Factor from factor().

Returns:

Scalar float64 log(det(A)).

Note

The logdet is computed at factor() time and cached on the token, so this call is essentially free. Under vmap over a batch of tokens it routes to the batched handler (one logdet per chain).