cr.sparse.opt.indicator_singleton

cr.sparse.opt.indicator_singleton(c)[source]

Returns an indicator function for a singleton set C={c}

Parameters

c (jax.numpy.ndarray) – An array

Returns

An indicator function

Let C be a singleton convex set {c} where cRn.

We implement its indicator function as:

(1)I(x)={0if x=cif xc

Note

The implementation broadcasts c to the shape of x before making the comparison.

Thus if c==4 and x=[4,4,4,4], then I(x)=0.