nocad.distances.observation_depth#

nocad.distances.observation_depth(adj, sensors)[source]#

Distance \(\rho^O_i\) of every state to the nearest sensor node (inf if it cannot reach one).

Examples

>>> observation_depth([[0, 1, 0], [0, 0, 1], [0, 0, 0]], [2])
array([2., 1., 0.])