cr.sparse.opt.indicator_zero

cr.sparse.opt.indicator_zero()[source]

Returns an indicator function for all zero arrays

Returns

An indicator function

The zero indicator function is defined as:

(1)\[\begin{split}I(x) = \begin{cases} 0 & \text{if } x = 0 \\ \infty & \text{if } x \neq 0 \end{cases}\end{split}\]

Note

By \(0\) in the R.H.S. we mean the zero vector \(0 \in \RR^n\). The dimension \(n\) is left unspecified and inferred automatically from the input \(x\).

The 0 on the L.H.S. is a scalar \(0 \in \RR\) as an indicator function is real valued.