1
C/MEMBR ADD NAME=VNORM,SSI=0
2
double precision function vnorm (n, v, w)
5
c-----------------------------------------------------------------------
6
c this function routine computes the weighted root-mean-square norm
7
c of the vector of length n contained in the array v, with weights
8
c contained in the array w of length n..
9
c vnorm = sqrt( (1/n) * sum( v(i)*w(i) )**2 )
10
c-----------------------------------------------------------------------
13
double precision v, w, sum
17
10 sum = sum + (v(i)*w(i))**2
18
vnorm = sqrt(sum/dble(n))
20
c----------------------- end of function vnorm -------------------------