https://www.cdslab.org/paramonte/fortran/2
Current view: top level - main - pm_statest@routines.inc.F90 (source / functions) Hit Total Coverage
Test: ParaMonte 2.0.0 :: Serial Fortran - Code Coverage Report Lines: 27 27 100.0 %
Date: 2024-04-08 03:18:57 Functions: 0 0 -
Legend: Lines: hit not hit

          Line data    Source code
       1             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       2             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
       3             : !!!!                                                                                                                            !!!!
       4             : !!!!    ParaMonte: Parallel Monte Carlo and Machine Learning Library.                                                           !!!!
       5             : !!!!                                                                                                                            !!!!
       6             : !!!!    Copyright (C) 2012-present, The Computational Data Science Lab                                                          !!!!
       7             : !!!!                                                                                                                            !!!!
       8             : !!!!    This file is part of the ParaMonte library.                                                                             !!!!
       9             : !!!!                                                                                                                            !!!!
      10             : !!!!    LICENSE                                                                                                                 !!!!
      11             : !!!!                                                                                                                            !!!!
      12             : !!!!       https://github.com/cdslaborg/paramonte/blob/main/LICENSE.md                                                          !!!!
      13             : !!!!                                                                                                                            !!!!
      14             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      15             : !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      16             : 
      17             : !>  \brief
      18             : !>  This include file contains the implementation of procedures in [pm_statest](@ref pm_statest).
      19             : !>
      20             : !>  \finmain
      21             : !>
      22             : !>  \author
      23             : !>  \AmirShahmoradi, Oct 16, 2009, 11:14 AM, Michigan
      24             : 
      25             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      26             : 
      27             :         !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      28             : #if     getProbKS_ENABLED || setProbKS_ENABLED
      29             :         !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      30             : 
      31             :         real(TKC) :: ess ! effective sample size.
      32             : #if     getProbKS_ENABLED
      33             :         real(TKC) :: quanKS
      34             : #endif
      35             : #if     WIX_ENABLED
      36          80 :         CHECK_ASSERTION(__LINE__, 0 < weisum1, SK_"@getProbKS(): The condition `0 < weisum1` must hold. weisum1 = "//getStr(weisum1))
      37          80 :         ess = sqrt(real(weisum1, TKC))
      38             : #elif   WRX_ENABLED
      39          40 :         CHECK_ASSERTION(__LINE__, 0 < weisum1, SK_"@getProbKS(): The condition `0 < weisum1` must hold. weisum1 = "//getStr(weisum1))
      40          40 :         CHECK_ASSERTION(__LINE__, 0 < wsqsum1, SK_"@getProbKS(): The condition `0 < wsqsum1` must hold. wsqsum1 = "//getStr(wsqsum1))
      41          40 :         ess = weisum1 / sqrt(wsqsum1)
      42             : #elif   WII_ENABLED
      43             :         real(TKC) :: ess1, ess2
      44          60 :         CHECK_ASSERTION(__LINE__, 0 < weisum1, SK_"@getProbKS(): The condition `0 < weisum1` must hold. weisum1 = "//getStr(weisum1))
      45          60 :         CHECK_ASSERTION(__LINE__, 0 < weisum2, SK_"@getProbKS(): The condition `0 < weisum2` must hold. weisum2 = "//getStr(weisum2))
      46          60 :         ess1 = real(weisum1, TKC)
      47          60 :         ess2 = real(weisum2, TKC)
      48          60 :         ess = sqrt(ess1 * ess2 / (ess1 + ess2))
      49             : #elif   WRI_ENABLED
      50             :         real(TKC) :: ess1, ess2
      51          40 :         CHECK_ASSERTION(__LINE__, 0 < weisum1, SK_"@getProbKS(): The condition `0 < weisum1` must hold. weisum1 = "//getStr(weisum1))
      52          40 :         CHECK_ASSERTION(__LINE__, 0 < wsqsum1, SK_"@getProbKS(): The condition `0 < wsqsum1` must hold. wsqsum1 = "//getStr(wsqsum1))
      53          40 :         CHECK_ASSERTION(__LINE__, 0 < weisum2, SK_"@getProbKS(): The condition `0 < weisum2` must hold. weisum2 = "//getStr(weisum2))
      54          40 :         ess1 = weisum1**2 / wsqsum1
      55          40 :         ess2 = real(weisum2, TKC)
      56          40 :         ess = sqrt(ess1 * ess2 / (ess1 + ess2))
      57             : #elif   WRR_ENABLED
      58             :         real(TKC) :: ess1, ess2
      59          20 :         CHECK_ASSERTION(__LINE__, 0 < weisum1, SK_"@getProbKS(): The condition `0 < weisum1` must hold. weisum1 = "//getStr(weisum1))
      60          20 :         CHECK_ASSERTION(__LINE__, 0 < wsqsum1, SK_"@getProbKS(): The condition `0 < wsqsum1` must hold. wsqsum1 = "//getStr(wsqsum1))
      61          20 :         CHECK_ASSERTION(__LINE__, 0 < weisum2, SK_"@getProbKS(): The condition `0 < weisum2` must hold. weisum2 = "//getStr(weisum2))
      62          20 :         CHECK_ASSERTION(__LINE__, 0 < wsqsum2, SK_"@getProbKS(): The condition `0 < wsqsum2` must hold. wsqsum2 = "//getStr(wsqsum2))
      63          20 :         ess1 = weisum1**2 / wsqsum1
      64          20 :         ess2 = weisum2**2 / wsqsum2
      65          20 :         ess = sqrt(ess1 * ess2 / (ess1 + ess2))
      66             : #else
      67             : #error  "Unrecognized interface."
      68             : #endif
      69         240 :         CHECK_ASSERTION(__LINE__, 0 <= statKS, SK_"@getProbKS(): The condition `0 <= statKS` must hold. statKS = "//getStr(statKS))
      70         240 :         quanKS = statKS * (ess + 0.12_TKC + 0.11_TKC / ess)
      71         240 :         call setKolmCDF(probKS, quanKS)
      72         240 :         probKS = 1._TKC - probKS
      73             : #else
      74             :         !%%%%%%%%%%%%%%%%%%%%%%%%
      75             : #error  "Unrecognized interface."
      76             :         !%%%%%%%%%%%%%%%%%%%%%%%%
      77             : #endif

ParaMonte: Parallel Monte Carlo and Machine Learning Library 
The Computational Data Science Lab
© Copyright 2012 - 2024