cr.sparse.opt.indicator_box

cr.sparse.opt.indicator_box(l=None, u=None)[source]

Returns an indicator function for the box \(l \preceq x \preceq u\)

Parameters
  • l (jax.numpy.ndarray) – Element wise lower bound \(l \in \RR^{n}\)

  • u (jax.numpy.ndarray) – Element wise upper bound \(u \in \RR^{n}\)

Returns

An indicator function

The indicator function is defined as:

(1)\[\begin{split}I(x) = \begin{cases} 0 & \text{if } l \preceq x \preceq u \\ \infty & \text{otherwise} \end{cases}\end{split}\]
  • The convex set \(C = \{ x : \; l \preceq x \preceq u \}\)..

  • If \(l\) is not specified, \(C = \{ x : \; x \preceq u \}\).

  • If \(u\) is not specified, \(C = \{ x : \; l \preceq x \}\).

At least lower or upper bound must be specified. Both cannot be left unspecified.