Bound

Bound#

class Bound#

Variable bound wrapper for Python

Note: This struct is named VariableBound in Rust code to avoid conflicts with PyO3’s Bound type, but is exposed as Bound in Python through the #[pyclass(name = "Bound")] attribute.

__copy__() → Bound#
__deepcopy__(_memo: Any) → Bound#
__eq__(other: object, /) → bool#
__new__(lower: float, upper: float) → Bound#
__repr__() → str#
contains(value: float, atol: float) → bool#

Return whether value satisfies this bound under atol.

Membership treats the bound as the two inequality residuals lower - value <= 0 and value - upper <= 0. Both use the same tolerance semantics as regular inequality constraints after finite evaluation. An infinite endpoint leaves that side unconstrained; non-finite values and finite-endpoint residual overflow are not contained.

intersection(other: Bound) → Optional[Bound]#
is_finite() → bool#
nearest_to_zero() → float#
negative() → Bound#
of_binary() → Bound#
positive() → Bound#
unbounded() → Bound#
width() → float#
property lower: float#

Read-only property.

property upper: float#

Read-only property.