cdm/src/main/java/ucar/ma2/MAVector.java
public double norm() {

    double sum = 0.0;
    for (int k=0; k<nelems; k++) {
      double val = getDouble(k);
      sum += val * val;
    }

    return Math.sqrt(sum);
  }
public double norm() {

    double sum = 0.0;
    for (int k=0; k<nelems; k++) {
      double val = getDouble(k);
      sum += val * val;
    }

    return Math.sqrt(sum);
  }
public double norm ( ) { double sum = 0.0 ; for ( int k = 0 ; k < nelems ; k ++ ) { double val = getDouble ( k ) ; sum += val * val ; } return Math . sqrt ( sum ) ; }
Get the L2 norm of this vector.
@return double norm
Get the L2 norm of this vector .