ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_clusTest.F90
Go to the documentation of this file.
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
36
37!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
38
40
41 use pm_err, only: err_type
42 use pm_kind, only: SK, IK, LK, RKG => RK
44
45 implicit none
46
47 character(*, SK), parameter :: MODULE_NAME = "@pm_clusTest"
48
49!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
50
79 type :: range_type
80 integer(IK) :: ndim(2) = [2, 2]
81 integer(IK) :: nell(2) = [1, 20]
82 integer(IK) :: nsam(2) = [5000, 5000]
83 real(RKG) :: mean(2) = [-1._RKG, 1._RKG]
84 real(RKG) :: std(2) = [0.001_RKG, 1._RKG]
85 end type
86
87!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
88
150 type(range_type) :: range
151 integer(IK) :: ndim
152 integer(IK) :: nell
153 integer(IK) :: nsam
154 integer(IK) :: nsim = 10000
156 real(RKG) :: logVolUnitBall
157 real(RKG) :: logDensity
160 real(RKG) :: logSumVolNormedEff
165 real(RKG) , allocatable :: std(:,:)
166 real(RKG) , allocatable :: sample(:,:)
167 real(RKG) , allocatable :: mean(:,:)
168 real(RKG) , allocatable :: invGram(:,:,:)
169 real(RKG) , allocatable :: choLowGramUpp(:,:,:)
170 real(RKG) , allocatable :: cumPropVolNormed(:)
171 real(RKG) , allocatable :: logVolNormed(:)
172 real(RKG) , allocatable :: mahalSq(:,:)
173 real(RKG) , allocatable :: invmul(:)
175 integer(IK) , allocatable :: size(:)
176 integer(IK) , allocatable :: membership(:)
177 type(err_type) :: err
178 contains
179 procedure, pass :: write => mmvue_type_write
180 end type
181
183 interface mmvue_type
184 module procedure :: mmvue_typer_rngf, mmvue_typer_rngx
185 end interface
187
188!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
189
245 interface mmvue_typer
246
247 impure module function mmvue_typer_rngf(rng, range, nsim) result(self)
248#if INTEL_COMPILER_ENABLED && DLL_ENABLED && (WINDOWS_ENABLED || DARWIN_ENABLED)
249 !DEC$ ATTRIBUTES DLLEXPORT :: mmvue_typer_rngf
250#endif
251 type(range_type), intent(in), optional :: range
252 integer(IK), intent(in), optional :: nsim
253 type(rngf_type), intent(in) :: rng
254 type(mmvue_type) :: self
255 end function
256
257 impure module function mmvue_typer_rngx(rng, range, nsim) result(self)
258#if INTEL_COMPILER_ENABLED && DLL_ENABLED && (WINDOWS_ENABLED || DARWIN_ENABLED)
259 !DEC$ ATTRIBUTES DLLEXPORT :: mmvue_typer_rngx
260#endif
261 type(range_type), intent(in), optional :: range
262 integer(IK), intent(in), optional :: nsim
263 type(rngx_type), intent(inout) :: rng
264 type(mmvue_type) :: self
265 end function
266
267 end interface
268
269!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
270
307
308 impure module subroutine mmvue_type_write(self, funit)
309#if INTEL_COMPILER_ENABLED && DLL_ENABLED && (WINDOWS_ENABLED || DARWIN_ENABLED)
310 !DEC$ ATTRIBUTES DLLEXPORT :: mmvue_type_write
311#endif
312 class(mmvue_type), intent(in) :: self
313 integer(IK), intent(in) :: funit
314 end subroutine
315
316 end interface
317
318!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
319
320end module pm_clusTest
Write the specifications of an object of type mmvue_type to an external sequential formatted filed wi...
Generate and return an object of type mmvue_type.
This module contains procedures and routines for the creating test datasets for clustering algorithms...
Definition: pm_clusTest.F90:39
character(*, SK), parameter MODULE_NAME
Definition: pm_clusTest.F90:47
This module contains classes and procedures for computing various statistical quantities related to t...
type(rngf_type) rngf
The scalar constant object of type rngf_type whose presence signified the use of the Fortran intrinsi...
This module contains classes and procedures for reporting and handling errors.
Definition: pm_err.F90:52
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
integer, parameter RK
The default real kind in the ParaMonte library: real64 in Fortran, c_double in C-Fortran Interoperati...
Definition: pm_kind.F90:543
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
Definition: pm_kind.F90:541
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
Definition: pm_kind.F90:540
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
Definition: pm_kind.F90:539
This is the derived type for generating objects containing the specifications of a realization of an ...
This is the derived type for generating objects containing the range of specifications of an MMVUE di...
Definition: pm_clusTest.F90:79
This is a concrete derived type whose instances can be used to define/request the default uniform ran...
This is the derived type for declaring and generating objects of type xoshiro256ssw_type containing a...
This is the derived type for generating objects to gracefully and verbosely handle runtime unexpected...
Definition: pm_err.F90:157