public double norm(){
  double sum=0;
  for (int i=0; i < components.length; i++)   sum+=components[i] * components[i];
  return Math.sqrt(sum);
}

public double norm ( ) { double sum = 0 ; for ( int i = 0 ; i < components . length ; i ++ ) sum += components [ i ] * components [ i ] ; return Math . sqrt ( sum ) ; }
computes the norm of a vector .
