This project contains C++ code to support the "Lagrange arc distance" as described in the paper Greenhoe(2016). Below is an abstract for that paper:
The spherical metric d_r operates on the surface of a sphere with radius r
centered at the origin in a linear space R^n.
Thus, for any pair of points (p,q) on the surface of this sphere,
(p,q) is in the domain of d_r and d_r(p,q) is the "distance" between those points.
However, if x and y are both in R^n but are not on the surface of a common sphere centered at the origin,
then (p,q) is not in the domain of d_r and d_r(p,q) is simply undefined.
In certain applications, however, it would be useful to have an extension d of d_r to the entire space R^n
(rather than just on a surface in R^n).
Real world applications for such an extended metric include calculations involving near earth objects,
and for certain distance spaces useful in symbolic sequence processing.
This paper introduces an extension to the spherical metric using a polar form of linear interpolation.
The extension is herein called the "Lagrange arc distance".
It has as its domain the entire space R^n, is homogeneous, and is continuous everywhere in R^n except at the origin.
However the extension does come at a cost:
The Lagrange arc distance d(p,q), as its name suggests, is a distance function rather than a metric.
In particular, the triangle inequality does not in general hold.
Moreover, it is not translation invariant, does not induce a norm, and balls in the distance space (R^n,d) are not convex.
On the other hand, empirical evidence suggests that the Lagrange arc distance results in structure similar to that
of the Euclidean metric in that balls in R^2 and R^3 generated by the two functions are in some regions of R^n very similar in form.
- Daniel J. Greenhoe. An extension to the spherical metric using polar linear interpolation, PeerJ Preprints, 4, e2467v1, 2016, English, 10.7287/peerj.preprints.2467v1, https://doi.org/10.7287/peerj.preprints.2467v1