mxdpgp Function

public pure function mxdpgp(n, a, x, y)

computation of the number mxdpgp=trans(x)*d**(-1)*y where d is a diagonal matrix in the factorization a+e=l*d*trans(l) obtained by the subroutine mxdpgf.

Arguments

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

order of the matrix a.

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

a(n*(n+1)/2) factorization a+e=l*d*trans(l) obtained by the subroutine mxdpgf.

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

input vector.

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

input vector.

Return Value real(kind=wp)

computed number mxdpgp=trans(x)*d**(-1)*y.


Called by

proc~~mxdpgp~~CalledByGraph proc~mxdpgp mxdpgp proc~bfgs_variable_metric_update bfgs_variable_metric_update proc~bfgs_variable_metric_update->proc~mxdpgp proc~psqp psqp_class%psqp proc~psqp->proc~bfgs_variable_metric_update proc~psqpn psqp_class%psqpn proc~psqpn->proc~psqp

Source Code

      pure function mxdpgp(n,a,x,y)

      integer,intent(in) :: n  !! order of the matrix a.
      real(wp),intent(in) :: a(*)  !! `a(n*(n+1)/2)` factorization `a+e=l*d*trans(l)`
                                   !! obtained by the subroutine [[mxdpgf]].
      real(wp),intent(in) :: x(*)  !! input vector.
      real(wp),intent(in) :: y(*)  !! input vector.
      real(wp) :: mxdpgp  !! computed number `mxdpgp=trans(x)*d**(-1)*y`.

      real(wp) :: temp
      integer :: i , j

      j = 0
      temp = 0.0_wp
      do i = 1 , n
         j = j + i
         temp = temp + x(i)*y(i)/a(j)
      end do
      mxdpgp = temp
      end function mxdpgp