question: public static double vectorLength ( double [ ] vector ) { double ret = 0 ; if ( vector == null ) return ret ; else { for ( double aVector : vector ) { ret += Math . pow ( aVector , 2 ) ; } } return ret ; }
target:  Returns the vector length (sqrt(sum(x_i))