Distance functions (metrics) to compare vectors