pdf_accumulate_v_1d Subroutine

subroutine pdf_accumulate_v_1d(self, data, sigma)

Arguments

Type IntentOptional Attributes Name
type(pdf_kernel) :: self
real(kind=8) :: data(:)
real(kind=8), optional :: sigma

Calls

proc~~pdf_accumulate_v_1d~2~~CallsGraph proc~pdf_accumulate_v_1d~2 pdf_accumulate_v_1d gaussian_kernel_1d gaussian_kernel_1d proc~pdf_accumulate_v_1d~2->gaussian_kernel_1d

Source Code

subroutine pdf_accumulate_v_1d(self,data,sigma)
  type(pdf_kernel) :: self
  real(8)          :: data(:),sigma_
  real(8),optional :: sigma
  integer          :: i
  if(.not.self%status)stop "PDF_ACCUMULATE: PDF not allocated"
  if(self%variance)then
     sigma_ = self%sigma
  else
     if(present(sigma))then
        sigma_ = sigma
     else
        stop "PDF_ACCUMULATE: PDF sigma not set or passed"
     endif
  endif
  !
  do i=1,size(data)
     self%pdf   = self%pdf + gaussian_kernel_1d(self%x,data(i),sigma_)
     self%Ndata = self%Ndata + 1
  enddo
end subroutine pdf_accumulate_v_1d