https://www.cdslab.org/paramonte/fortran/2
Current view: top level - main - pm_distBern@routines.F90 (source / functions) Hit Total Coverage
Test: ParaMonte 2.0.0 :: Serial Fortran - Code Coverage Report Lines: 126 126 100.0 %
Date: 2024-04-08 03:18:57 Functions: 62 62 100.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 file contains procedure implementations of [pm_distBern](@ref pm_distBern).
      19             : !>
      20             : !>  \finmain
      21             : !>
      22             : !>  \author
      23             : !>  \AmirShahmoradi, Oct 16, 2009, 11:14 AM, Michigan
      24             : 
      25             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      26             : 
      27             : submodule (pm_distBern) routines ! LCOV_EXCL_LINE
      28             : 
      29             : #if CHECK_ENABLED
      30             :     use pm_err, only: getFine
      31             :     use pm_val2str, only: getStr
      32             :     use pm_err, only: setAsserted
      33             : #define CHECK_ASSERTION(LINE,ASSERTION,MSG) \
      34             : call setAsserted(ASSERTION,getFine(__FILE__,LINE)//MODULE_NAME//MSG);
      35             : #else
      36             : #define CHECK_ASSERTION(LINE,ASSERTION,MSG) continue;
      37             : #endif
      38             : 
      39             :     implicit none
      40             : 
      41             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      42             : 
      43             : contains
      44             : 
      45             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      46             : 
      47             : #define isHead_ENABLED 1
      48             : 
      49             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      50             : 
      51             : #define DD_ENABLED 1
      52             : 
      53       80001 :     module procedure isHeadDD
      54       80001 :         rand = isHead(p = .5)
      55       80001 :     end procedure
      56             : 
      57             : #undef DD_ENABLED
      58             : 
      59             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      60             : 
      61             : #define DS_ENABLED 1
      62             : 
      63           5 :     module procedure isHeadDS
      64           5 :         rand = isHead(p = .5, size = size)
      65           5 :     end procedure
      66             : 
      67             : #undef DS_ENABLED
      68             : 
      69             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      70             : 
      71             : #define PD_ENABLED 1
      72             : 
      73             : #if RK5_ENABLED
      74             :     module procedure isHeadPD_RK5
      75             :         use pm_kind, only: RKC => RK5
      76             : #include "pm_distBern@routines.inc.F90"
      77             :     end procedure
      78             : #endif
      79             : 
      80             : #if RK4_ENABLED
      81       40001 :     module procedure isHeadPD_RK4
      82             :         use pm_kind, only: RKC => RK4
      83             : #include "pm_distBern@routines.inc.F90"
      84       40001 :     end procedure
      85             : #endif
      86             : 
      87             : #if RK3_ENABLED
      88       40000 :     module procedure isHeadPD_RK3
      89             :         use pm_kind, only: RKC => RK3
      90             : #include "pm_distBern@routines.inc.F90"
      91       40000 :     end procedure
      92             : #endif
      93             : 
      94             : #if RK2_ENABLED
      95       40001 :     module procedure isHeadPD_RK2
      96             :         use pm_kind, only: RKC => RK2
      97             : #include "pm_distBern@routines.inc.F90"
      98       40001 :     end procedure
      99             : #endif
     100             : 
     101             : #if RK1_ENABLED
     102      120107 :     module procedure isHeadPD_RK1
     103             :         use pm_kind, only: RKC => RK1
     104             : #include "pm_distBern@routines.inc.F90"
     105      120107 :     end procedure
     106             : #endif
     107             : 
     108             : #undef PD_ENABLED
     109             : 
     110             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     111             : 
     112             : #define PS_ENABLED 1
     113             : 
     114             : #if RK5_ENABLED
     115             :     module procedure isHeadPS_RK5
     116             :         use pm_kind, only: RKC => RK5
     117             : #include "pm_distBern@routines.inc.F90"
     118             :     end procedure
     119             : #endif
     120             : 
     121             : #if RK4_ENABLED
     122           2 :     module procedure isHeadPS_RK4
     123             :         use pm_kind, only: RKC => RK4
     124             : #include "pm_distBern@routines.inc.F90"
     125           2 :     end procedure
     126             : #endif
     127             : 
     128             : #if RK3_ENABLED
     129           2 :     module procedure isHeadPS_RK3
     130             :         use pm_kind, only: RKC => RK3
     131             : #include "pm_distBern@routines.inc.F90"
     132           2 :     end procedure
     133             : #endif
     134             : 
     135             : #if RK2_ENABLED
     136           2 :     module procedure isHeadPS_RK2
     137             :         use pm_kind, only: RKC => RK2
     138             : #include "pm_distBern@routines.inc.F90"
     139           2 :     end procedure
     140             : #endif
     141             : 
     142             : #if RK1_ENABLED
     143           8 :     module procedure isHeadPS_RK1
     144             :         use pm_kind, only: RKC => RK1
     145             : #include "pm_distBern@routines.inc.F90"
     146           8 :     end procedure
     147             : #endif
     148             : 
     149             : #undef PS_ENABLED
     150             : 
     151             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     152             : 
     153             : #undef isHead_ENABLED
     154             : 
     155             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     156             : 
     157             : #define getBernRand_ENABLED 1
     158             : 
     159             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     160             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     161             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     162             : 
     163             : #define PD_ENABLED 1
     164             : 
     165             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     166             : 
     167             : #define RK_ENABLED 1
     168             : 
     169             : #if RK5_ENABLED
     170             :     module procedure getBernRandPD_RK5
     171             :         use pm_kind, only: RKC => RK5
     172             : #include "pm_distBern@routines.inc.F90"
     173             :     end procedure
     174             : #endif
     175             : 
     176             : #if RK4_ENABLED
     177       60001 :     module procedure getBernRandPD_RK4
     178             :         use pm_kind, only: RKC => RK4
     179             : #include "pm_distBern@routines.inc.F90"
     180       60001 :     end procedure
     181             : #endif
     182             : 
     183             : #if RK3_ENABLED
     184       60000 :     module procedure getBernRandPD_RK3
     185             :         use pm_kind, only: RKC => RK3
     186             : #include "pm_distBern@routines.inc.F90"
     187       60000 :     end procedure
     188             : #endif
     189             : 
     190             : #if RK2_ENABLED
     191       60001 :     module procedure getBernRandPD_RK2
     192             :         use pm_kind, only: RKC => RK2
     193             : #include "pm_distBern@routines.inc.F90"
     194       60001 :     end procedure
     195             : #endif
     196             : 
     197             : #if RK1_ENABLED
     198       60001 :     module procedure getBernRandPD_RK1
     199             :         use pm_kind, only: RKC => RK1
     200             : #include "pm_distBern@routines.inc.F90"
     201       60001 :     end procedure
     202             : #endif
     203             : 
     204             : #undef RK_ENABLED
     205             : 
     206             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     207             : 
     208             : #undef PD_ENABLED
     209             : 
     210             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     211             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     212             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     213             : 
     214             : #define PS_ENABLED 1
     215             : 
     216             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     217             : 
     218             : #define RK_ENABLED 1
     219             : 
     220             : #if RK5_ENABLED
     221             :     module procedure getBernRandPS_RK5
     222             :         use pm_kind, only: RKC => RK5
     223             : #include "pm_distBern@routines.inc.F90"
     224             :     end procedure
     225             : #endif
     226             : 
     227             : #if RK4_ENABLED
     228           4 :     module procedure getBernRandPS_RK4
     229             :         use pm_kind, only: RKC => RK4
     230             : #include "pm_distBern@routines.inc.F90"
     231           4 :     end procedure
     232             : #endif
     233             : 
     234             : #if RK3_ENABLED
     235           3 :     module procedure getBernRandPS_RK3
     236             :         use pm_kind, only: RKC => RK3
     237             : #include "pm_distBern@routines.inc.F90"
     238           3 :     end procedure
     239             : #endif
     240             : 
     241             : #if RK2_ENABLED
     242           4 :     module procedure getBernRandPS_RK2
     243             :         use pm_kind, only: RKC => RK2
     244             : #include "pm_distBern@routines.inc.F90"
     245           4 :     end procedure
     246             : #endif
     247             : 
     248             : #if RK1_ENABLED
     249           4 :     module procedure getBernRandPS_RK1
     250             :         use pm_kind, only: RKC => RK1
     251             : #include "pm_distBern@routines.inc.F90"
     252           4 :     end procedure
     253             : #endif
     254             : 
     255             : #undef RK_ENABLED
     256             : 
     257             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     258             : 
     259             : #undef PS_ENABLED
     260             : 
     261             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     262             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     263             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     264             : 
     265             : #undef getBernRand_ENABLED
     266             : 
     267             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     268             : 
     269             : #define setBernRand_ENABLED 1
     270             : 
     271             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     272             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     273             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     274             : 
     275             : #define RUP_ENABLED 1
     276             : 
     277             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     278             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     279             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     280             : 
     281             : #define IK_ENABLED 1
     282             : 
     283             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     284             : 
     285             : #if IK5_ENABLED && RK5_ENABLED
     286             :     module procedure setBernRandRUP_IK5_RK5
     287             :         use pm_kind, only: IKC => IK5, RKC => RK5
     288             : #include "pm_distBern@routines.inc.F90"
     289             :     end procedure
     290             : #endif
     291             : 
     292             : #if IK5_ENABLED && RK4_ENABLED
     293      120000 :     module procedure setBernRandRUP_IK5_RK4
     294             :         use pm_kind, only: IKC => IK5, RKC => RK4
     295             : #include "pm_distBern@routines.inc.F90"
     296      120000 :     end procedure
     297             : #endif
     298             : 
     299             : #if IK5_ENABLED && RK3_ENABLED
     300      120000 :     module procedure setBernRandRUP_IK5_RK3
     301             :         use pm_kind, only: IKC => IK5, RKC => RK3
     302             : #include "pm_distBern@routines.inc.F90"
     303      120000 :     end procedure
     304             : #endif
     305             : 
     306             : #if IK5_ENABLED && RK2_ENABLED
     307      120000 :     module procedure setBernRandRUP_IK5_RK2
     308             :         use pm_kind, only: IKC => IK5, RKC => RK2
     309             : #include "pm_distBern@routines.inc.F90"
     310      120000 :     end procedure
     311             : #endif
     312             : 
     313             : #if IK5_ENABLED && RK1_ENABLED
     314      120000 :     module procedure setBernRandRUP_IK5_RK1
     315             :         use pm_kind, only: IKC => IK5, RKC => RK1
     316             : #include "pm_distBern@routines.inc.F90"
     317      120000 :     end procedure
     318             : #endif
     319             : 
     320             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     321             : 
     322             : #if IK4_ENABLED && RK5_ENABLED
     323             :     module procedure setBernRandRUP_IK4_RK5
     324             :         use pm_kind, only: IKC => IK4, RKC => RK5
     325             : #include "pm_distBern@routines.inc.F90"
     326             :     end procedure
     327             : #endif
     328             : 
     329             : #if IK4_ENABLED && RK4_ENABLED
     330      120000 :     module procedure setBernRandRUP_IK4_RK4
     331             :         use pm_kind, only: IKC => IK4, RKC => RK4
     332             : #include "pm_distBern@routines.inc.F90"
     333      120000 :     end procedure
     334             : #endif
     335             : 
     336             : #if IK4_ENABLED && RK3_ENABLED
     337      120000 :     module procedure setBernRandRUP_IK4_RK3
     338             :         use pm_kind, only: IKC => IK4, RKC => RK3
     339             : #include "pm_distBern@routines.inc.F90"
     340      120000 :     end procedure
     341             : #endif
     342             : 
     343             : #if IK4_ENABLED && RK2_ENABLED
     344      120000 :     module procedure setBernRandRUP_IK4_RK2
     345             :         use pm_kind, only: IKC => IK4, RKC => RK2
     346             : #include "pm_distBern@routines.inc.F90"
     347      120000 :     end procedure
     348             : #endif
     349             : 
     350             : #if IK4_ENABLED && RK1_ENABLED
     351      120000 :     module procedure setBernRandRUP_IK4_RK1
     352             :         use pm_kind, only: IKC => IK4, RKC => RK1
     353             : #include "pm_distBern@routines.inc.F90"
     354      120000 :     end procedure
     355             : #endif
     356             : 
     357             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     358             : 
     359             : #if IK3_ENABLED && RK5_ENABLED
     360             :     module procedure setBernRandRUP_IK3_RK5
     361             :         use pm_kind, only: IKC => IK3, RKC => RK5
     362             : #include "pm_distBern@routines.inc.F90"
     363             :     end procedure
     364             : #endif
     365             : 
     366             : #if IK3_ENABLED && RK4_ENABLED
     367      240006 :     module procedure setBernRandRUP_IK3_RK4
     368             :         use pm_kind, only: IKC => IK3, RKC => RK4
     369             : #include "pm_distBern@routines.inc.F90"
     370      240006 :     end procedure
     371             : #endif
     372             : 
     373             : #if IK3_ENABLED && RK3_ENABLED
     374      240000 :     module procedure setBernRandRUP_IK3_RK3
     375             :         use pm_kind, only: IKC => IK3, RKC => RK3
     376             : #include "pm_distBern@routines.inc.F90"
     377      240000 :     end procedure
     378             : #endif
     379             : 
     380             : #if IK3_ENABLED && RK2_ENABLED
     381      240006 :     module procedure setBernRandRUP_IK3_RK2
     382             :         use pm_kind, only: IKC => IK3, RKC => RK2
     383             : #include "pm_distBern@routines.inc.F90"
     384      240006 :     end procedure
     385             : #endif
     386             : 
     387             : #if IK3_ENABLED && RK1_ENABLED
     388      240012 :     module procedure setBernRandRUP_IK3_RK1
     389             :         use pm_kind, only: IKC => IK3, RKC => RK1
     390             : #include "pm_distBern@routines.inc.F90"
     391      240012 :     end procedure
     392             : #endif
     393             : 
     394             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     395             : 
     396             : #if IK2_ENABLED && RK5_ENABLED
     397             :     module procedure setBernRandRUP_IK2_RK5
     398             :         use pm_kind, only: IKC => IK2, RKC => RK5
     399             : #include "pm_distBern@routines.inc.F90"
     400             :     end procedure
     401             : #endif
     402             : 
     403             : #if IK2_ENABLED && RK4_ENABLED
     404      120000 :     module procedure setBernRandRUP_IK2_RK4
     405             :         use pm_kind, only: IKC => IK2, RKC => RK4
     406             : #include "pm_distBern@routines.inc.F90"
     407      120000 :     end procedure
     408             : #endif
     409             : 
     410             : #if IK2_ENABLED && RK3_ENABLED
     411      120000 :     module procedure setBernRandRUP_IK2_RK3
     412             :         use pm_kind, only: IKC => IK2, RKC => RK3
     413             : #include "pm_distBern@routines.inc.F90"
     414      120000 :     end procedure
     415             : #endif
     416             : 
     417             : #if IK2_ENABLED && RK2_ENABLED
     418      120000 :     module procedure setBernRandRUP_IK2_RK2
     419             :         use pm_kind, only: IKC => IK2, RKC => RK2
     420             : #include "pm_distBern@routines.inc.F90"
     421      120000 :     end procedure
     422             : #endif
     423             : 
     424             : #if IK2_ENABLED && RK1_ENABLED
     425      120000 :     module procedure setBernRandRUP_IK2_RK1
     426             :         use pm_kind, only: IKC => IK2, RKC => RK1
     427             : #include "pm_distBern@routines.inc.F90"
     428      120000 :     end procedure
     429             : #endif
     430             : 
     431             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     432             : 
     433             : #if IK1_ENABLED && RK5_ENABLED
     434             :     module procedure setBernRandRUP_IK1_RK5
     435             :         use pm_kind, only: IKC => IK1, RKC => RK5
     436             : #include "pm_distBern@routines.inc.F90"
     437             :     end procedure
     438             : #endif
     439             : 
     440             : #if IK1_ENABLED && RK4_ENABLED
     441      120000 :     module procedure setBernRandRUP_IK1_RK4
     442             :         use pm_kind, only: IKC => IK1, RKC => RK4
     443             : #include "pm_distBern@routines.inc.F90"
     444      120000 :     end procedure
     445             : #endif
     446             : 
     447             : #if IK1_ENABLED && RK3_ENABLED
     448      120000 :     module procedure setBernRandRUP_IK1_RK3
     449             :         use pm_kind, only: IKC => IK1, RKC => RK3
     450             : #include "pm_distBern@routines.inc.F90"
     451      120000 :     end procedure
     452             : #endif
     453             : 
     454             : #if IK1_ENABLED && RK2_ENABLED
     455      120000 :     module procedure setBernRandRUP_IK1_RK2
     456             :         use pm_kind, only: IKC => IK1, RKC => RK2
     457             : #include "pm_distBern@routines.inc.F90"
     458      120000 :     end procedure
     459             : #endif
     460             : 
     461             : #if IK1_ENABLED && RK1_ENABLED
     462      120000 :     module procedure setBernRandRUP_IK1_RK1
     463             :         use pm_kind, only: IKC => IK1, RKC => RK1
     464             : #include "pm_distBern@routines.inc.F90"
     465      120000 :     end procedure
     466             : #endif
     467             : 
     468             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     469             : 
     470             : #undef IK_ENABLED
     471             : 
     472             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     473             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     474             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     475             : 
     476             : #define LK_ENABLED 1
     477             : 
     478             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     479             : 
     480             : #if LK5_ENABLED && RK5_ENABLED
     481             :     module procedure setBernRandRUP_LK5_RK5
     482             :         use pm_kind, only: LKC => LK5, RKC => RK5
     483             : #include "pm_distBern@routines.inc.F90"
     484             :     end procedure
     485             : #endif
     486             : 
     487             : #if LK5_ENABLED && RK4_ENABLED
     488      120000 :     module procedure setBernRandRUP_LK5_RK4
     489             :         use pm_kind, only: LKC => LK5, RKC => RK4
     490             : #include "pm_distBern@routines.inc.F90"
     491      120000 :     end procedure
     492             : #endif
     493             : 
     494             : #if LK5_ENABLED && RK3_ENABLED
     495      120000 :     module procedure setBernRandRUP_LK5_RK3
     496             :         use pm_kind, only: LKC => LK5, RKC => RK3
     497             : #include "pm_distBern@routines.inc.F90"
     498      120000 :     end procedure
     499             : #endif
     500             : 
     501             : #if LK5_ENABLED && RK2_ENABLED
     502      120000 :     module procedure setBernRandRUP_LK5_RK2
     503             :         use pm_kind, only: LKC => LK5, RKC => RK2
     504             : #include "pm_distBern@routines.inc.F90"
     505      120000 :     end procedure
     506             : #endif
     507             : 
     508             : #if LK5_ENABLED && RK1_ENABLED
     509      120000 :     module procedure setBernRandRUP_LK5_RK1
     510             :         use pm_kind, only: LKC => LK5, RKC => RK1
     511             : #include "pm_distBern@routines.inc.F90"
     512      120000 :     end procedure
     513             : #endif
     514             : 
     515             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     516             : 
     517             : #if LK4_ENABLED && RK5_ENABLED
     518             :     module procedure setBernRandRUP_LK4_RK5
     519             :         use pm_kind, only: LKC => LK4, RKC => RK5
     520             : #include "pm_distBern@routines.inc.F90"
     521             :     end procedure
     522             : #endif
     523             : 
     524             : #if LK4_ENABLED && RK4_ENABLED
     525      120000 :     module procedure setBernRandRUP_LK4_RK4
     526             :         use pm_kind, only: LKC => LK4, RKC => RK4
     527             : #include "pm_distBern@routines.inc.F90"
     528      120000 :     end procedure
     529             : #endif
     530             : 
     531             : #if LK4_ENABLED && RK3_ENABLED
     532      120000 :     module procedure setBernRandRUP_LK4_RK3
     533             :         use pm_kind, only: LKC => LK4, RKC => RK3
     534             : #include "pm_distBern@routines.inc.F90"
     535      120000 :     end procedure
     536             : #endif
     537             : 
     538             : #if LK4_ENABLED && RK2_ENABLED
     539      120000 :     module procedure setBernRandRUP_LK4_RK2
     540             :         use pm_kind, only: LKC => LK4, RKC => RK2
     541             : #include "pm_distBern@routines.inc.F90"
     542      120000 :     end procedure
     543             : #endif
     544             : 
     545             : #if LK4_ENABLED && RK1_ENABLED
     546      120000 :     module procedure setBernRandRUP_LK4_RK1
     547             :         use pm_kind, only: LKC => LK4, RKC => RK1
     548             : #include "pm_distBern@routines.inc.F90"
     549      120000 :     end procedure
     550             : #endif
     551             : 
     552             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     553             : 
     554             : #if LK3_ENABLED && RK5_ENABLED
     555             :     module procedure setBernRandRUP_LK3_RK5
     556             :         use pm_kind, only: LKC => LK3, RKC => RK5
     557             : #include "pm_distBern@routines.inc.F90"
     558             :     end procedure
     559             : #endif
     560             : 
     561             : #if LK3_ENABLED && RK4_ENABLED
     562      200001 :     module procedure setBernRandRUP_LK3_RK4
     563             :         use pm_kind, only: LKC => LK3, RKC => RK4
     564             : #include "pm_distBern@routines.inc.F90"
     565      200001 :     end procedure
     566             : #endif
     567             : 
     568             : #if LK3_ENABLED && RK3_ENABLED
     569      200000 :     module procedure setBernRandRUP_LK3_RK3
     570             :         use pm_kind, only: LKC => LK3, RKC => RK3
     571             : #include "pm_distBern@routines.inc.F90"
     572      200000 :     end procedure
     573             : #endif
     574             : 
     575             : #if LK3_ENABLED && RK2_ENABLED
     576      200001 :     module procedure setBernRandRUP_LK3_RK2
     577             :         use pm_kind, only: LKC => LK3, RKC => RK2
     578             : #include "pm_distBern@routines.inc.F90"
     579      200001 :     end procedure
     580             : #endif
     581             : 
     582             : #if LK3_ENABLED && RK1_ENABLED
     583      360123 :     module procedure setBernRandRUP_LK3_RK1
     584             :         use pm_kind, only: LKC => LK3, RKC => RK1
     585             : #include "pm_distBern@routines.inc.F90"
     586      360123 :     end procedure
     587             : #endif
     588             : 
     589             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     590             : 
     591             : #if LK2_ENABLED && RK5_ENABLED
     592             :     module procedure setBernRandRUP_LK2_RK5
     593             :         use pm_kind, only: LKC => LK2, RKC => RK5
     594             : #include "pm_distBern@routines.inc.F90"
     595             :     end procedure
     596             : #endif
     597             : 
     598             : #if LK2_ENABLED && RK4_ENABLED
     599      120000 :     module procedure setBernRandRUP_LK2_RK4
     600             :         use pm_kind, only: LKC => LK2, RKC => RK4
     601             : #include "pm_distBern@routines.inc.F90"
     602      120000 :     end procedure
     603             : #endif
     604             : 
     605             : #if LK2_ENABLED && RK3_ENABLED
     606      120000 :     module procedure setBernRandRUP_LK2_RK3
     607             :         use pm_kind, only: LKC => LK2, RKC => RK3
     608             : #include "pm_distBern@routines.inc.F90"
     609      120000 :     end procedure
     610             : #endif
     611             : 
     612             : #if LK2_ENABLED && RK2_ENABLED
     613      120000 :     module procedure setBernRandRUP_LK2_RK2
     614             :         use pm_kind, only: LKC => LK2, RKC => RK2
     615             : #include "pm_distBern@routines.inc.F90"
     616      120000 :     end procedure
     617             : #endif
     618             : 
     619             : #if LK2_ENABLED && RK1_ENABLED
     620      120000 :     module procedure setBernRandRUP_LK2_RK1
     621             :         use pm_kind, only: LKC => LK2, RKC => RK1
     622             : #include "pm_distBern@routines.inc.F90"
     623      120000 :     end procedure
     624             : #endif
     625             : 
     626             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     627             : 
     628             : #if LK1_ENABLED && RK5_ENABLED
     629             :     module procedure setBernRandRUP_LK1_RK5
     630             :         use pm_kind, only: LKC => LK1, RKC => RK5
     631             : #include "pm_distBern@routines.inc.F90"
     632             :     end procedure
     633             : #endif
     634             : 
     635             : #if LK1_ENABLED && RK4_ENABLED
     636      120000 :     module procedure setBernRandRUP_LK1_RK4
     637             :         use pm_kind, only: LKC => LK1, RKC => RK4
     638             : #include "pm_distBern@routines.inc.F90"
     639      120000 :     end procedure
     640             : #endif
     641             : 
     642             : #if LK1_ENABLED && RK3_ENABLED
     643      120000 :     module procedure setBernRandRUP_LK1_RK3
     644             :         use pm_kind, only: LKC => LK1, RKC => RK3
     645             : #include "pm_distBern@routines.inc.F90"
     646      120000 :     end procedure
     647             : #endif
     648             : 
     649             : #if LK1_ENABLED && RK2_ENABLED
     650      120000 :     module procedure setBernRandRUP_LK1_RK2
     651             :         use pm_kind, only: LKC => LK1, RKC => RK2
     652             : #include "pm_distBern@routines.inc.F90"
     653      120000 :     end procedure
     654             : #endif
     655             : 
     656             : #if LK1_ENABLED && RK1_ENABLED
     657      120000 :     module procedure setBernRandRUP_LK1_RK1
     658             :         use pm_kind, only: LKC => LK1, RKC => RK1
     659             : #include "pm_distBern@routines.inc.F90"
     660      120000 :     end procedure
     661             : #endif
     662             : 
     663             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     664             : 
     665             : #undef LK_ENABLED
     666             : 
     667             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     668             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     669             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     670             : 
     671             : #define RK_ENABLED 1
     672             : 
     673             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     674             : 
     675             : #if RK5_ENABLED
     676             :     module procedure setBernRandRUP_RK5_RK5
     677             :         use pm_kind, only: RKC => RK5
     678             : #include "pm_distBern@routines.inc.F90"
     679             :     end procedure
     680             : #endif
     681             : 
     682             : #if RK4_ENABLED
     683      120000 :     module procedure setBernRandRUP_RK4_RK4
     684             :         use pm_kind, only: RKC => RK4
     685             : #include "pm_distBern@routines.inc.F90"
     686      120000 :     end procedure
     687             : #endif
     688             : 
     689             : #if RK3_ENABLED
     690      120000 :     module procedure setBernRandRUP_RK3_RK3
     691             :         use pm_kind, only: RKC => RK3
     692             : #include "pm_distBern@routines.inc.F90"
     693      120000 :     end procedure
     694             : #endif
     695             : 
     696             : #if RK2_ENABLED
     697      120000 :     module procedure setBernRandRUP_RK2_RK2
     698             :         use pm_kind, only: RKC => RK2
     699             : #include "pm_distBern@routines.inc.F90"
     700      120000 :     end procedure
     701             : #endif
     702             : 
     703             : #if RK1_ENABLED
     704      120006 :     module procedure setBernRandRUP_RK1_RK1
     705             :         use pm_kind, only: RKC => RK1
     706             : #include "pm_distBern@routines.inc.F90"
     707      120006 :     end procedure
     708             : #endif
     709             : 
     710             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     711             : 
     712             : #undef RK_ENABLED
     713             : 
     714             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     715             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     716             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     717             : 
     718             : #undef RUP_ENABLED
     719             : 
     720             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     721             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     722             :     !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     723             : 
     724             : #undef setBernRand_ENABLED
     725             : 
     726             : !%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     727             : 
     728             : #undef CHECK_ASSERTION
     729             : 
     730             : end submodule routines

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