Closed adamreichold closed 2 years ago
(As a performance aside, all these distances in the variogram module are used in comparisons. Hence, some of the square roots should be avoidable by squaring the other sides of these inequalities like bandwidth or lower_bin_edge. That squaring could also be done outside of the inner loops to further reduce costs.)
Actually, this is not really true as the angle computations needs the actual distance and Haversine distance does not loose any square roots like the Euclidean one does. So while this would probably make the common case a tiny bit faster, it makes the overall code more complex...
This slipped in when refactoring the variogram code is not detected by the current unit tests and I admittedly do not feel confident to write a regression test fixing it.
(As a performance aside, all these distances in the variogram module are used in comparisons. Hence, some of the square roots should be avoidable by squaring the other sides of these inequalities like bandwidth or lower_bin_edge. That squaring could also be done outside of the inner loops to further reduce costs.)