flopscope.

flopscope.accounting.slogdet_cost

flopscope.accounting.slogdet_cost(n, symmetric=False)[flopscope source]

Weighted FLOP cost of sign and log-determinant.

Parameters

n:int

Number of columns in the input matrix.

symmetric:bool, optional

Argument forwarded to the analytical linalg.slogdet cost formula. Defaults to False.

Returns

:int

Weighted public cost estimate, floored to match runtime accounting.

Notes

This helper multiplies the analytical FLOP count by the active weight from flopscope._weights and then applies int(...) so public estimates match budget deductions.

Simplified cubic cost model for sign and log-determinant computation.