A function for calculating elementwise distance between points might be useful. Something like this for example:
function elementwise_distance(M::AbstractPowerManifold, p, q)
dists = similar(p, number_eltype(p), power_dimensions(M))
return elementwise_distance!(M, dists, p, q)
end
function elementwise_distance!(M::AbstractPowerManifold, dists, p, q)
rep_size = representation_size(M.manifold)
for i in get_iterator(M)
dists[i...] = distance(M.manifold, _read(M, rep_size, p, i), _read(M, rep_size, q, i))
end
return dists
end
A function for calculating elementwise distance between points might be useful. Something like this for example: