enorm Function

public function enorm(n, x)

ENORM computes the Euclidean norm of a vector.

Arguments

Type IntentOptional Attributes Name
integer(kind=4) :: n
real(kind=8) :: x(n)

Return Value real(kind=8)


Called by

proc~~enorm~~CalledByGraph proc~enorm enorm proc~dogleg dogleg proc~dogleg->proc~enorm proc~hybrd hybrd proc~hybrd->proc~enorm proc~hybrd->proc~dogleg proc~qrfac qrfac proc~hybrd->proc~qrfac proc~hybrj hybrj proc~hybrj->proc~enorm proc~hybrj->proc~dogleg proc~hybrj->proc~qrfac proc~lmder lmder proc~lmder->proc~enorm proc~lmpar lmpar proc~lmder->proc~lmpar proc~lmder->proc~qrfac proc~lmdif lmdif proc~lmdif->proc~enorm proc~lmdif->proc~lmpar proc~lmdif->proc~qrfac proc~lmpar->proc~enorm proc~lmstr lmstr proc~lmstr->proc~enorm proc~lmstr->proc~lmpar proc~lmstr->proc~qrfac proc~qrfac->proc~enorm proc~hybrd1 hybrd1 proc~hybrd1->proc~hybrd proc~hybrj1 hybrj1 proc~hybrj1->proc~hybrj proc~lmder1 lmder1 proc~lmder1->proc~lmder proc~lmdif1 lmdif1 proc~lmdif1->proc~lmdif proc~lmstr1 lmstr1 proc~lmstr1->proc~lmstr proc~qform_test qform_test proc~qform_test->proc~qrfac proc~hybrd1_test hybrd1_test proc~hybrd1_test->proc~hybrd1 proc~hybrj1_test hybrj1_test proc~hybrj1_test->proc~hybrj1 proc~lmder1_2_test lmder1_2_test proc~lmder1_2_test->proc~lmder1 proc~lmder1_test lmder1_test proc~lmder1_test->proc~lmder1 proc~lmdif1_2_test lmdif1_2_test proc~lmdif1_2_test->proc~lmdif1 proc~lmdif1_test lmdif1_test proc~lmdif1_test->proc~lmdif1 proc~lmstr1_2_test lmstr1_2_test proc~lmstr1_2_test->proc~lmstr1 proc~lmstr1_test lmstr1_test proc~lmstr1_test->proc~lmstr1 program~test_minpack test_minpack program~test_minpack->proc~qform_test program~test_minpack->proc~hybrd1_test program~test_minpack->proc~hybrj1_test program~test_minpack->proc~lmder1_2_test program~test_minpack->proc~lmder1_test program~test_minpack->proc~lmdif1_2_test program~test_minpack->proc~lmdif1_test program~test_minpack->proc~lmstr1_2_test program~test_minpack->proc~lmstr1_test

Source Code

function enorm( n, x )

!*****************************************************************************80
!
!! ENORM computes the Euclidean norm of a vector.
!
!  Discussion:
!
!    This is an extremely simplified version of the original ENORM
!    routine, which has been renamed to "ENORM2".
!
!  Licensing:
!
!    This code may freely be copied, modified, and used for any purpose.
!
!  Modified:
!
!    06 April 2010
!
!  Author:
!
!    Original FORTRAN77 version by Jorge More, Burton Garbow, Kenneth Hillstrom.
!    FORTRAN90 version by John Burkardt.
!
!  Reference:
!
!    Jorge More, Burton Garbow, Kenneth Hillstrom,
!    User Guide for MINPACK-1,
!    Technical Report ANL-80-74,
!    Argonne National Laboratory, 1980.
!
!  Parameters:
!
!    Input, integer ( kind = 4 ) N, is the length of the vector.
!
!    Input, real ( kind = 8 ) X(N), the vector whose norm is desired.
!
!    Output, real ( kind = 8 ) ENORM, the Euclidean norm of the vector.
!
  implicit none

  integer ( kind = 4 ) n
  real ( kind = 8 ) x(n)
  real ( kind = 8 ) enorm

  enorm = sqrt ( sum ( x(1:n) ** 2 ))

  return
endfunction enorm