LinearConstraintSet#

class superglm.LinearConstraintSet(
A: NDArray,
b: NDArray,
)#

Bases: object

Linear inequality constraints: A @ theta >= b.

Generic constraint representation, not spline-specific. The QP solver operates on these without knowing which basis produced them.

Parameters:
ANDArray

Constraint matrix, shape (n_constraints, n_params).

bNDArray

Right-hand side, shape (n_constraints,).

is_feasible(
theta: NDArray,
tol: float = -1e-10,
) → bool#

Check whether theta satisfies all constraints (A @ theta >= b).

compose(
P: NDArray,
) → LinearConstraintSet#

Map constraints through a projection: A_new = A @ P, b unchanged.