// p-norm distance with weights (weighted l_p distance)
p-norm distance with weights (weighted l_p distance)
// p - norm distance with weights ( weighted l_p distance )
func WeightedMinkowskiDistance(firstVector, secondVector, weightVector []float64, p float64) (float64, error) {
	distance := 0.
	for ii := range firstVector {
		distance += weightVector[ii] * math.Pow(math.Abs(firstVector[ii]-secondVector[ii]), p)
	}
	return math.Pow(distance, 1/p), nil
}
func WeightedMinkowskiDistance ( firstVector , secondVector , weightVector [ ] float64 , p float64 ) ( float64 , error ) { distance := 0. for ii := range firstVector { distance += weightVector [ ii ] * math . Pow ( math . Abs ( firstVector [ ii ] - secondVector [ ii ] ) , p ) } return math . Pow ( distance , 1 / p ) , nil }
p-norm distance with weights (weighted l_p distance)
p - norm distance with weights ( weighted l_p distance )