cmp_explained_variance Subroutine

private impure subroutine cmp_explained_variance(this)

Type Bound

tpca

Arguments

Type IntentOptional Attributes Name
class(tpca), intent(inout) :: this

Called by

proc~~cmp_explained_variance~~CalledByGraph proc~cmp_explained_variance forpca::tpca%cmp_explained_variance proc~pca forpca::tpca%pca proc~pca->proc~cmp_explained_variance program~benchmark benchmark program~benchmark->proc~pca program~test1 test1 program~test1->proc~pca

Source Code

   impure subroutine cmp_explained_variance(this)
#else
   pure subroutine cmp_explained_variance(this)
#endif
      class(tpca), intent(inout) :: this
      real(rk)                   :: sum_latent

#if defined(USE_COARRAY)
      if (this_image() == 1) then
#endif
         sum_latent = sum(this%latent(1:this%npc))
         this%explained_variance = this%latent / sum_latent
#if defined(USE_COARRAY)
      end if
#endif

   end subroutine cmp_explained_variance