A vectorised version of the Brent root algorithm. Useful for solving many similar optimisation problems where evaluation of the objective function can be calculated more efficiently when vectorised
Arguments
- f
the objective function to optimise over. Must take a single vector as input and output a vector of values
- lower
vector of left hand end points of the intervals to optimise over
- upper
vector of right hand end points of the intervals to optimise over
- tol
the desired accuracy (convergence tolerance)
- itmax
the maximum number of iterations
- eps
XXXXX TODO