code: public static double computeL2(DoubleTuple t)
      {
          double sum = 0;
          for (int i=0; i<t.getSize(); i++)
          {
              double ti = t.get(i);
              sum += ti * ti;
          }
          return Math.sqrt(sum);
      }
docs: Computes the L2 norm (euclidean length) of the given tuple
  
  @param t The tuple
  @return The L2 norm