hbf / miniball

Fast computation of the smallest enclosing ball of a point set, in low or moderately high dimensions.
133 stars 41 forks source link

How do I get the coordinates of the centre of the miniball? #11

Closed DTMilodowski closed 11 years ago

DTMilodowski commented 11 years ago

Hi there,

I'm having difficulties working out how to retrieve the coordinates of the centre of the circle. I guess there must be a relatively simple way of doing it, but I can't figure it out from reading through the header file Seb.h.

In the end I want to be able to save the coordinates of the centre point, and the radius, so that I can use this info for other purposes.

Many thanks!

hbf commented 11 years ago

Use the mb.center_begin() method to get an iterator over the d center coordinates. You can use the [i] operator to get the i th coordinate.

See https://github.com/hbf/miniball/blob/master/cpp/test/example.C for an example.