mxvmax Function

public pure function mxvmax(n, x)

l-infinity norm of a vector.

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n

vector dimension.

real(kind=wp), intent(in) :: x(*)

x(n) input vector.

Return Value real(kind=wp)

l-infinity norm of the vector x.


Called by

proc~~mxvmax~~CalledByGraph proc~mxvmax mxvmax proc~psqp psqp_class%psqp proc~psqp->proc~mxvmax proc~psqpn psqp_class%psqpn proc~psqpn->proc~psqp

Source Code

      pure function mxvmax(n,x)

      integer,intent(in) :: n  !! vector dimension.
      real(wp),intent(in) :: x(*)  !! x(n)  input vector.
      real(wp) :: mxvmax  !! l-infinity norm of the vector x.

      integer :: i

      mxvmax = 0.0_wp
      do i = 1 , n
         mxvmax = max(mxvmax,abs(x(i)))
      end do

      end function mxvmax