boundlab.zono.linearizers.Reciprocal#
- class boundlab.zono.linearizers.Reciprocal[source]#
Bases:
OpHandlerTangent-line enclosure of \(1/x\) on positive intervals.
A tangent at \(t\) has slope \(-1/t^2\) and, by convexity, lower bounds \(1/x\) after its own offset; the geometric mean \(t = \sqrt{lu}\) equalizes the gap at both endpoints (the classical minimal-\(\beta\) choice), guarded by \(t \ge u/2 + 0.01\) against collapse. The upper offset is the endpoint maximum of \(1/x - \lambda x\); centering the two offsets gives \(\mu, \beta\). Degenerate (point) intervals return the exact value.
Methods
Whether this handler applies to these operands (default: always).
Transform the operands; sub-operations go through
interp.<op>so the enclosing domain's handlers apply to them too.A copy of this handler that takes precedence over
otherwhen both are ready for the same call.- __call__(l, u, x=None)#
Call self as a function.
- __init__(op='reciprocal', apply_bound=<function linearizer_fn.<locals>.decorator.<locals>.LinearizerHandler.<lambda>>)#
- apply_bound(x)#
- condition(x, **kwargs)#
Whether this handler applies to these operands (default: always).
- handle(interp, x, **kwargs)#
Transform the operands; sub-operations go through
interp.<op>so the enclosing domain’s handlers apply to them too.
- override_handler(other)#
A copy of this handler that takes precedence over
otherwhen both are ready for the same call.