Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Weighted median #176
@@ Coverage Diff @@ ## svn-trunk #176 +/- ## ============================================= - Coverage 79.22% 79.22% -0.01% ============================================= Files 202 202 Lines 63011 63020 +9 ============================================= + Hits 49921 49927 +6 - Misses 13090 13093 +3
Basically Weiszfeld algorithm may find just a local optimum in case of negative weights, as problem is not convex anymore. It's going to be one closest to the centroid, though.
Fermat-Weber problem is constrained by positive only weights.
There are different ways I see to resolve: