Development and analysis of an optimal bounding ellipsoid algorithm using stochastic approximation