! Calculeaza norma (1 vector), cf. kodNorm:
! kodNorm =0 : norma-infinit
!         =1 : 1-norma
!         =2 : 2-norma (euclidiana)
! kodNorm >=3: norma-infinit

Function vNorm(m, v, kodNorm)
real(8) v(m), vNorm

! Calculate norm
select case(kodNorm)
case(0)
vNorm =maxval(dabs(v))

case(1)
vNorm =sum(dabs(v))

case(2)
vNorm =dsqrt(dot_product(v,v))

!case(3:)
case default
vNorm =maxval(dabs(v))


end select

END


