You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
distance_from_diagonal_scaling and squared_distance_from_diagonal_scaling have complicated implementations with pow, sqrt, etc (all missing std::). As far as I can tell, up to a multiplicative constant (which we can probably omit), the first one should be just std::abs(p.second-p.first) and the second one the square of p.second-p.first.
The text was updated successfully, but these errors were encountered:
It actually computes the projection on the diagonal (b+d)/2, and then the squared distance to that. It happens to be equal to |d-b|/sqrt(2). When computing the distance to the diagonal, Manhattan, Chebyshev and Euclidean are all proportional.
distance_from_diagonal_scaling
andsquared_distance_from_diagonal_scaling
have complicated implementations with pow, sqrt, etc (all missingstd::
). As far as I can tell, up to a multiplicative constant (which we can probably omit), the first one should be juststd::abs(p.second-p.first)
and the second one the square ofp.second-p.first
.The text was updated successfully, but these errors were encountered: