inAball.m#
Given a collection of balls \(\Omega_\xi\) for centres \(\xi\in\mathcal{P}_{\mathrm{stat}}\), each with radius \(r_\xi\), this algorithm determines if
for some \(p\).
This algorithm is used when approximating the steepest descent path \(h_\eta(p)\) for increasing values of \(p\); we want to terminate the path approximation process if \(h_\eta(p)\in \Omega_\xi\) for some \(\xi\in\mathcal{P}_{\mathrm{stat}}\).
[isInBall, outputIndex] = inAball(h, ballCentres, ballRadii)
Inputs#
h: The point being tested, typically the farthest point of the contour being traced.ballCentres: Array of centres of balls \(\xi\in\mathcal{P}_{\mathrm{stat}}\).ballRadii: Array of radii of balls \(r_\xi\) for \(\xi\in\mathcal{P}_{\mathrm{stat}}\).
Outputs#
isInBall: Boolean value, true ifh\(=h_\eta(p)\) is inside of any ball.outputIndex: IfisInBall, then this is the index of \(\xi\) inballCentres. Otherwise, this value is zero.