boundlab.gradlin.trapezoid_region#

boundlab.gradlin.trapezoid_region(lx, ux, ly, uy, ld, ud)[source]#

Build box bounds + diff-constraint rows for the 2D trapezoid.

Returns:

  • lb, ub ((*batch, 2) axis-aligned box bounds.)

  • A_extra, b_extra ((*batch, 2, 2), (*batch, 2) for) – -x + y <= -ld and x - y <= ud.

Return type:

tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]