ztrace Function

pure function ztrace(A) result(t)

Arguments

Type IntentOptional Attributes Name
complex(kind=8), intent(in) :: A(:,:)

Return Value complex(kind=8)


Source Code

pure function ztrace(A) result(t)
  complex(8), intent(in) :: A(:,:)
  complex(8)             :: t
  integer                :: i
  t = zero
  do i = 1,minval(shape(A))
     t = t + A(i,i)
  end do
end function ztrace