This repo has some nasty bug, see broken tests. After bug hunt a decission to refactor led to the rewriting of the package, which gave the opportunity to change the license. Development continues in BoundingSphere.jl. Use that package instead.
This is a Julia package for finding the smallest enclosing sphere for a set of points in an arbitrary number of dimensions. The implementation is based on Bernd Gärtner's C++ Miniball but is implemented entirely in Julia. The original C++ implementation is licensed under GNU General Public License (GPLv3), which is why this implementation also has the same license.
julia> using Miniball julia> ball = miniball([1.0 0.0; 0.0 1.0]) julia> ball.center [0.5,0.5] julia> ball.squared_radius 0.5 julia> ball = miniball([-1.0 0.0; 1.0 0.0; 0.0 1.0; 0.0 -1.0]) julia> ball.center ([0.0,0.0],1.0) julia> ball.squared_radius 1.0 julia> ball = miniball(rand(1000000,3)) julia> ball.center [0.502234, 0.495934, 0.504458] julia> ball.squared_center 0.7283212748080066
Original Miniball documentation http://www-oldurls.inf.ethz.ch/personal/gaertner/miniball.html
4 months ago