It seems like there are still too many things in one library. Would be better to focus on a well defined set of atomic primitives, and then keep the distances generic (as here). So instead of special functions or handling here, construct classes with the "natural" difference operator defined such that vec1[i]-vec2[i] gives the right difference which can then be pushed through the relevant Lp norm.
It seems like there are still too many things in one library. Would be better to focus on a well defined set of atomic primitives, and then keep the distances generic (as here). So instead of special functions or handling here, construct classes with the "natural" difference operator defined such that
vec1[i]-vec2[i]gives the right difference which can then be pushed through the relevant Lp norm.