ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation.
pm_knn::setKnnSorted Interface Reference

Return the input distance matrix whose columns are sorted in ascending order on output, optionally only up to the kth row of each column, such that the kth row in the ith column is the kth nearest neighbor to the \(i^{th}\) reference point.
More...

Detailed Description

Return the input distance matrix whose columns are sorted in ascending order on output, optionally only up to the kth row of each column, such that the kth row in the ith column is the kth nearest neighbor to the \(i^{th}\) reference point.

The input matrix of shape (1:npnt, 1:nref) represents the distances of nref reference points from npnt neighbor points.
The matrix entries can be any measure of distance as long they are non-negative.

Parameters
[in,out]distance: The input or input/output contiguous array of rank 2 of shape (1:npnt, 1:nref) of
  1. type real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128).
each column i of which contains the distances of npnt neighbor points stored by the column rows from the ith reference point.
For example, such distance matrix can be obtained via:
  1. getDisMatEuclid or setDisMatEuclid
or any other distance metric module of the library.
  1. If the input argument rank is missing, then distance has intent(inout).
    On output, the rows of each column of distance are sorted separately in ascending order such that the kth row in column i contains the distance of the kth nearest neighbor of reference(1:ndim, i) represented by column distance(1:npnt, i).
  2. If the input argument rank is present, then distance has intent(in).
    On output, the rows of each column of rank are filled with the rank of the corresponding element of distance ranked by its nearness to the reference represented by column distance(1:npnt, i).
[out]rank: The output contiguous array of the same rank and shape as distance of type integer of default kind IK each element of which contains the nearest neighbor rank of the corresponding element of distance.
The neighborhood ranking is with respect to the point represented by the column of the element.
(optional. It can be present if and only if the input argument k is missing.)
[in]k: The output scalar integer of default kind IK, representing the row in each column of distance up to which the distances in each column will be sorted in ascending order.
The rest of the rows beyond the kth row remain unsorted.
This argument is useful when sorting the entire distance matrix or computing the entire rank matrix is unnecessary.
(optional, default = size(distance, 1). It can be present if and only if the input argument rank is missing.)


Possible calling interfaces

use pm_knn, only: setKnnSorted
call setKnnSorted(distance(1:npnt, 1:nref))
call setKnnSorted(distance(1:npnt, 1:nref), k)
call setKnnSorted(distance(1:npnt, 1:nref), rank(1:npnt, 1:nref))
Return the input distance matrix whose columns are sorted in ascending order on output,...
Definition: pm_knn.F90:181
This module contains procedures and generic interfaces for computing the nearest neighbor statistics ...
Definition: pm_knn.F90:82
Warning
The condition all(shape(distance) == shape(rank)) must hold for the corresponding input arguments.
The condition 0 < k .and. k <= size(distance, 1) must hold for the corresponding input arguments.
These conditions are verified only if the library is built with the preprocessor macro CHECK_ENABLED=1.
The pure procedure(s) documented herein become impure when the ParaMonte library is compiled with preprocessor macro CHECK_ENABLED=1.
By default, these procedures are pure in release build and impure in debug and testing builds.
Note
To sort the neighbors of an individual point (corresponding to a single column vector), use the generic interfaces of pm_arrayRank or pm_arraySort.
See also
getDisEuclid
setDisEuclid
getDisMatEuclid
setDisMatEuclid


Example usage

1program example
2
3 use pm_kind, only: SK, IK, LK, RKH
4 use pm_io, only: display_type
5 use pm_distanceEuclid, only: getDisMatEuclid, rdpack, uppLow, uppLowDia, euclid, euclidu, euclidsq
7 use pm_distUnif, only: getUnifRand
8 use pm_knn, only: setKnnSorted
9
10 implicit none
11
12 integer(IK) :: npnt, nref, itry, ntry = 5
13 type(display_type) :: disp
14 disp = display_type(file = "main.out.F90")
15
16 call disp%skip()
17 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
18 call disp%show("! Sort a precomputed distance matrix according to the nearest neighbors.")
19 call disp%show("!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
20 call disp%skip()
21
22 block
23 use pm_kind, only: RKG => RKS ! all processor kinds are supported.
24 integer(IK), allocatable :: rank(:,:)
25 real(RKG), allocatable :: dismat(:,:), point(:,:)
26 do itry = 1, ntry
27 call disp%skip()
28 call disp%show("npnt = getUnifRand(1, 3); nref = getUnifRand(5, 7)")
29 npnt = getUnifRand(1, 3); nref = getUnifRand(5, 7)
30 call disp%show("[npnt, nref]")
31 call disp%show( [npnt, nref] )
32 call disp%show("point = getUnifRand(1._RKG, 2._RKG, npnt, nref)")
33 point = getUnifRand(1._RKG, 2._RKG, npnt, nref)
34 call disp%show("point")
35 call disp%show( point )
36 call disp%show("dismat = getDisMatEuclid(point)")
37 dismat = getDisMatEuclid(point)
38 call disp%show("dismat")
39 call disp%show( dismat )
40 call disp%show("call setKnnSorted(dismat, k = 1)")
41 call setKnnSorted(dismat, k = 1)
42 call disp%show("dismat")
43 call disp%show( dismat )
44 call disp%show("call setKnnSorted(dismat, k = 2)")
45 call setKnnSorted(dismat, k = 2)
46 call disp%show("dismat")
47 call disp%show( dismat )
48 call disp%show("dismat = getDisMatEuclid(point)")
49 dismat = getDisMatEuclid(point)
50 call disp%show("dismat")
51 call disp%show( dismat )
52 call disp%show("call setResized(rank, shape(dismat))")
53 call setResized(rank, shape(dismat))
54 call disp%show("call setKnnSorted(dismat, rank)")
55 call setKnnSorted(dismat, rank)
56 call disp%show("dismat")
57 call disp%show( dismat )
58 call disp%show("rank")
59 call disp%show( rank )
60 call disp%skip()
61 call disp%show("dismat = getDisMatEuclid(rdpack, uppLow, point) ! drop the zero-valued diagonal elements of the dismat matrix.")
62 dismat = getDisMatEuclid(rdpack, uppLow, point) ! drop the zero-valued diagonal elements of the dismat matrix.
63 call disp%show("dismat")
64 call disp%show( dismat )
65 call disp%show("call setKnnSorted(dismat, k = 1)")
66 call setKnnSorted(dismat, k = 1)
67 call disp%show("dismat")
68 call disp%show( dismat )
69 call disp%show("dismat = getDisMatEuclid(rdpack, uppLow, point) ! drop the zero-valued diagonal elements of the dismat matrix.")
70 dismat = getDisMatEuclid(rdpack, uppLow, point) ! drop the zero-valued diagonal elements of the dismat matrix.
71 call disp%show("dismat")
72 call disp%show( dismat )
73 call disp%show("call setResized(rank, shape(dismat))")
74 call setResized(rank, shape(dismat))
75 call disp%show("call setKnnSorted(dismat, rank)")
76 call setKnnSorted(dismat, rank)
77 call disp%show("dismat")
78 call disp%show( dismat )
79 call disp%show("rank")
80 call disp%show( rank )
81 call disp%skip()
82 end do
83 end block
84
85end program example
Allocate or resize (shrink or expand) an input allocatable scalar string or array of rank 1....
Generate and return a scalar or a contiguous array of rank 1 of length s1 of randomly uniformly distr...
Return the full or a subset of the Euclidean (squared) distance matrix of the input set of npnt point...
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11726
This is a generic method of the derived type display_type with pass attribute.
Definition: pm_io.F90:11508
This module contains procedures and generic interfaces for resizing allocatable arrays of various typ...
This module contains classes and procedures for computing various statistical quantities related to t...
This module contains procedures and generic interfaces for computing the Euclidean norm of a single p...
type(euclidu_type), parameter euclidu
This is a scalar parameter object of type euclidu_typethat is exclusively used to request unsafe meth...
type(euclid_type), parameter euclid
This is a scalar parameter object of type euclid_type that is exclusively used to request safe method...
type(euclidsq_type), parameter euclidsq
This is a scalar parameter object of type euclidsq_typethat is exclusively used to request computing ...
This module contains classes and procedures for input/output (IO) or generic display operations on st...
Definition: pm_io.F90:252
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
Definition: pm_io.F90:11393
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
Definition: pm_kind.F90:268
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
integer, parameter RKH
The scalar integer constant of intrinsic default kind, representing the highest-precision real kind t...
Definition: pm_kind.F90:858
integer, parameter RKS
The single-precision real kind in Fortran mode. On most platforms, this is an 32-bit real kind.
Definition: pm_kind.F90:567
Generate and return an object of type display_type.
Definition: pm_io.F90:10282

Example Unix compile command via Intel ifort compiler
1#!/usr/bin/env sh
2rm main.exe
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example Windows Batch compile command via Intel ifort compiler
1del main.exe
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
4main.exe

Example Unix / MinGW compile command via GNU gfortran compiler
1#!/usr/bin/env sh
2rm main.exe
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
4./main.exe

Example output
1
2!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3! Sort a precomputed distance matrix according to the nearest neighbors.
4!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
5
6
7npnt = getUnifRand(1, 3); nref = getUnifRand(5, 7)
8[npnt, nref]
9+3, +6
10point = getUnifRand(1._RKG, 2._RKG, npnt, nref)
11point
12+1.83003092, +1.26690674, +1.09465182, +1.33559465, +1.15017366, +1.24838042
13+1.01995254, +1.61507702, +1.08069932, +1.82644153, +1.44732261, +1.18508375
14+1.23188114, +1.90583205, +1.03020942, +1.18999219, +1.10574937, +1.53930306
15dismat = getDisMatEuclid(point)
16dismat
17+0.00000000, +1.06089199, +0.764947057, +0.946914136, +0.812871635, +0.678302169
18+1.06089199, +0.00000000, +1.04016650, +0.749546349, +0.825772583, +0.565314949
19+0.764947057, +1.04016650, +0.00000000, +0.799822092, +0.378419876, +0.541945457
20+0.946914136, +0.749546349, +0.799822092, +0.00000000, +0.430359095, +0.735502720
21+0.812871635, +0.825772583, +0.378419876, +0.430359095, +0.00000000, +0.516122639
22+0.678302169, +0.565314949, +0.541945457, +0.735502720, +0.516122639, +0.00000000
23call setKnnSorted(dismat, k = 1)
24dismat
25+0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000
26+0.678302169, +0.565314949, +0.378419876, +0.430359095, +0.378419876, +0.516122639
27+1.06089199, +0.749546349, +0.541945457, +0.749546349, +0.430359095, +0.541945457
28+0.946914136, +0.825772583, +0.799822092, +0.735502720, +0.516122639, +0.735502720
29+0.812871635, +1.04016650, +1.04016650, +0.799822092, +0.825772583, +0.565314949
30+0.764947057, +1.06089199, +0.764947057, +0.946914136, +0.812871635, +0.678302169
31call setKnnSorted(dismat, k = 2)
32dismat
33+0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000
34+0.678302169, +0.565314949, +0.378419876, +0.430359095, +0.378419876, +0.516122639
35+0.764947057, +0.749546349, +0.541945457, +0.735502720, +0.430359095, +0.541945457
36+0.946914136, +0.825772583, +0.799822092, +0.749546349, +0.516122639, +0.735502720
37+0.812871635, +1.04016650, +1.04016650, +0.799822092, +0.825772583, +0.565314949
38+1.06089199, +1.06089199, +0.764947057, +0.946914136, +0.812871635, +0.678302169
39dismat = getDisMatEuclid(point)
40dismat
41+0.00000000, +1.06089199, +0.764947057, +0.946914136, +0.812871635, +0.678302169
42+1.06089199, +0.00000000, +1.04016650, +0.749546349, +0.825772583, +0.565314949
43+0.764947057, +1.04016650, +0.00000000, +0.799822092, +0.378419876, +0.541945457
44+0.946914136, +0.749546349, +0.799822092, +0.00000000, +0.430359095, +0.735502720
45+0.812871635, +0.825772583, +0.378419876, +0.430359095, +0.00000000, +0.516122639
46+0.678302169, +0.565314949, +0.541945457, +0.735502720, +0.516122639, +0.00000000
47call setResized(rank, shape(dismat))
48call setKnnSorted(dismat, rank)
49dismat
50+0.00000000, +1.06089199, +0.764947057, +0.946914136, +0.812871635, +0.678302169
51+1.06089199, +0.00000000, +1.04016650, +0.749546349, +0.825772583, +0.565314949
52+0.764947057, +1.04016650, +0.00000000, +0.799822092, +0.378419876, +0.541945457
53+0.946914136, +0.749546349, +0.799822092, +0.00000000, +0.430359095, +0.735502720
54+0.812871635, +0.825772583, +0.378419876, +0.430359095, +0.00000000, +0.516122639
55+0.678302169, +0.565314949, +0.541945457, +0.735502720, +0.516122639, +0.00000000
56rank
57+1, +2, +3, +4, +5, +6
58+6, +6, +5, +5, +3, +5
59+3, +4, +6, +6, +4, +3
60+5, +5, +1, +2, +6, +2
61+4, +3, +4, +3, +1, +1
62+2, +1, +2, +1, +2, +4
63
64dismat = getDisMatEuclid(rdpack, uppLow, point) ! drop the zero-valued diagonal elements of the dismat matrix.
65dismat
66+1.06089199, +1.06089199, +0.764947057, +0.946914136, +0.812871635, +0.678302169
67+0.764947057, +1.04016650, +1.04016650, +0.749546349, +0.825772583, +0.565314949
68+0.946914136, +0.749546349, +0.799822092, +0.799822092, +0.378419876, +0.541945457
69+0.812871635, +0.825772583, +0.378419876, +0.430359095, +0.430359095, +0.735502720
70+0.678302169, +0.565314949, +0.541945457, +0.735502720, +0.516122639, +0.516122639
71call setKnnSorted(dismat, k = 1)
72dismat
73+0.678302169, +0.565314949, +0.378419876, +0.430359095, +0.378419876, +0.516122639
74+0.764947057, +0.749546349, +0.541945457, +0.735502720, +0.430359095, +0.541945457
75+0.812871635, +1.04016650, +0.764947057, +0.749546349, +0.516122639, +0.565314949
76+0.946914136, +0.825772583, +1.04016650, +0.799822092, +0.825772583, +0.735502720
77+1.06089199, +1.06089199, +0.799822092, +0.946914136, +0.812871635, +0.678302169
78dismat = getDisMatEuclid(rdpack, uppLow, point) ! drop the zero-valued diagonal elements of the dismat matrix.
79dismat
80+1.06089199, +1.06089199, +0.764947057, +0.946914136, +0.812871635, +0.678302169
81+0.764947057, +1.04016650, +1.04016650, +0.749546349, +0.825772583, +0.565314949
82+0.946914136, +0.749546349, +0.799822092, +0.799822092, +0.378419876, +0.541945457
83+0.812871635, +0.825772583, +0.378419876, +0.430359095, +0.430359095, +0.735502720
84+0.678302169, +0.565314949, +0.541945457, +0.735502720, +0.516122639, +0.516122639
85call setResized(rank, shape(dismat))
86call setKnnSorted(dismat, rank)
87dismat
88+1.06089199, +1.06089199, +0.764947057, +0.946914136, +0.812871635, +0.678302169
89+0.764947057, +1.04016650, +1.04016650, +0.749546349, +0.825772583, +0.565314949
90+0.946914136, +0.749546349, +0.799822092, +0.799822092, +0.378419876, +0.541945457
91+0.812871635, +0.825772583, +0.378419876, +0.430359095, +0.430359095, +0.735502720
92+0.678302169, +0.565314949, +0.541945457, +0.735502720, +0.516122639, +0.516122639
93rank
94+5, +5, +4, +4, +3, +5
95+2, +3, +5, +5, +4, +3
96+4, +4, +1, +2, +5, +2
97+3, +2, +3, +3, +1, +1
98+1, +1, +2, +1, +2, +4
99
100
101npnt = getUnifRand(1, 3); nref = getUnifRand(5, 7)
102[npnt, nref]
103+3, +5
104point = getUnifRand(1._RKG, 2._RKG, npnt, nref)
105point
106+1.94748020, +1.28070569, +1.59922433, +1.00571728, +1.19214106
107+1.22956884, +1.87739241, +1.79334354, +1.57461894, +1.93789816
108+1.20720792, +1.97074890, +1.15514755, +1.94769239, +1.41840398
109dismat = getDisMatEuclid(point)
110dismat
111+0.00000000, +1.20302057, +0.664706230, +1.24671340, +1.05682135
112+1.20302057, +0.00000000, +0.879615784, +0.409660816, +0.562662899
113+0.664706230, +0.879615784, +0.00000000, +1.01401091, +0.505882204
114+1.24671340, +0.409660816, +1.01401091, +0.00000000, +0.668484688
115+1.05682135, +0.562662899, +0.505882204, +0.668484688, +0.00000000
116call setKnnSorted(dismat, k = 1)
117dismat
118+0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000
119+0.664706230, +0.409660816, +0.505882204, +0.409660816, +0.505882204
120+1.20302057, +0.562662899, +0.879615784, +0.668484688, +0.562662899
121+1.24671340, +0.879615784, +1.01401091, +1.01401091, +0.668484688
122+1.05682135, +1.20302057, +0.664706230, +1.24671340, +1.05682135
123call setKnnSorted(dismat, k = 2)
124dismat
125+0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000
126+0.664706230, +0.409660816, +0.505882204, +0.409660816, +0.505882204
127+1.05682135, +0.562662899, +0.664706230, +0.668484688, +0.562662899
128+1.24671340, +0.879615784, +1.01401091, +1.01401091, +0.668484688
129+1.20302057, +1.20302057, +0.879615784, +1.24671340, +1.05682135
130dismat = getDisMatEuclid(point)
131dismat
132+0.00000000, +1.20302057, +0.664706230, +1.24671340, +1.05682135
133+1.20302057, +0.00000000, +0.879615784, +0.409660816, +0.562662899
134+0.664706230, +0.879615784, +0.00000000, +1.01401091, +0.505882204
135+1.24671340, +0.409660816, +1.01401091, +0.00000000, +0.668484688
136+1.05682135, +0.562662899, +0.505882204, +0.668484688, +0.00000000
137call setResized(rank, shape(dismat))
138call setKnnSorted(dismat, rank)
139dismat
140+0.00000000, +1.20302057, +0.664706230, +1.24671340, +1.05682135
141+1.20302057, +0.00000000, +0.879615784, +0.409660816, +0.562662899
142+0.664706230, +0.879615784, +0.00000000, +1.01401091, +0.505882204
143+1.24671340, +0.409660816, +1.01401091, +0.00000000, +0.668484688
144+1.05682135, +0.562662899, +0.505882204, +0.668484688, +0.00000000
145rank
146+1, +2, +3, +4, +5
147+3, +4, +5, +2, +3
148+5, +5, +1, +5, +2
149+2, +3, +2, +3, +4
150+4, +1, +4, +1, +1
151
152dismat = getDisMatEuclid(rdpack, uppLow, point) ! drop the zero-valued diagonal elements of the dismat matrix.
153dismat
154+1.20302057, +1.20302057, +0.664706230, +1.24671340, +1.05682135
155+0.664706230, +0.879615784, +0.879615784, +0.409660816, +0.562662899
156+1.24671340, +0.409660816, +1.01401091, +1.01401091, +0.505882204
157+1.05682135, +0.562662899, +0.505882204, +0.668484688, +0.668484688
158call setKnnSorted(dismat, k = 1)
159dismat
160+0.664706230, +0.409660816, +0.505882204, +0.409660816, +0.505882204
161+1.05682135, +0.562662899, +0.664706230, +0.668484688, +0.562662899
162+1.24671340, +0.879615784, +1.01401091, +1.01401091, +0.668484688
163+1.20302057, +1.20302057, +0.879615784, +1.24671340, +1.05682135
164dismat = getDisMatEuclid(rdpack, uppLow, point) ! drop the zero-valued diagonal elements of the dismat matrix.
165dismat
166+1.20302057, +1.20302057, +0.664706230, +1.24671340, +1.05682135
167+0.664706230, +0.879615784, +0.879615784, +0.409660816, +0.562662899
168+1.24671340, +0.409660816, +1.01401091, +1.01401091, +0.505882204
169+1.05682135, +0.562662899, +0.505882204, +0.668484688, +0.668484688
170call setResized(rank, shape(dismat))
171call setKnnSorted(dismat, rank)
172dismat
173+1.20302057, +1.20302057, +0.664706230, +1.24671340, +1.05682135
174+0.664706230, +0.879615784, +0.879615784, +0.409660816, +0.562662899
175+1.24671340, +0.409660816, +1.01401091, +1.01401091, +0.505882204
176+1.05682135, +0.562662899, +0.505882204, +0.668484688, +0.668484688
177rank
178+2, +3, +4, +2, +3
179+4, +4, +1, +4, +2
180+1, +2, +2, +3, +4
181+3, +1, +3, +1, +1
182
183
184npnt = getUnifRand(1, 3); nref = getUnifRand(5, 7)
185[npnt, nref]
186+1, +7
187point = getUnifRand(1._RKG, 2._RKG, npnt, nref)
188point
189+1.66497350, +1.20799267, +1.84089470, +1.30011511, +1.79450452, +1.07639575, +1.72083569
190dismat = getDisMatEuclid(point)
191dismat
192+0.00000000, +0.456980824, +0.175921202, +0.364858389, +0.129531026, +0.588577747, +0.558621846E-1
193+0.456980824, +0.00000000, +0.632902026, +0.921224356E-1, +0.586511850, +0.131596923, +0.512843013
194+0.175921202, +0.632902026, +0.00000000, +0.540779591, +0.463901758E-1, +0.764498889, +0.120059013
195+0.364858389, +0.921224356E-1, +0.540779591, +0.00000000, +0.494389415, +0.223719358, +0.420720577
196+0.129531026, +0.586511850, +0.463901758E-1, +0.494389415, +0.00000000, +0.718108714, +0.736688375E-1
197+0.588577747, +0.131596923, +0.764498889, +0.223719358, +0.718108714, +0.00000000, +0.644439936
198+0.558621846E-1, +0.512843013, +0.120059013, +0.420720577, +0.736688375E-1, +0.644439936, +0.00000000
199call setKnnSorted(dismat, k = 1)
200dismat
201+0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000
202+0.558621846E-1, +0.921224356E-1, +0.463901758E-1, +0.921224356E-1, +0.463901758E-1, +0.131596923, +0.558621846E-1
203+0.175921202, +0.131596923, +0.120059013, +0.223719358, +0.736688375E-1, +0.223719358, +0.120059013
204+0.456980824, +0.456980824, +0.175921202, +0.364858389, +0.129531026, +0.588577747, +0.512843013
205+0.129531026, +0.586511850, +0.632902026, +0.494389415, +0.586511850, +0.718108714, +0.736688375E-1
206+0.588577747, +0.632902026, +0.764498889, +0.540779591, +0.718108714, +0.764498889, +0.644439936
207+0.364858389, +0.512843013, +0.540779591, +0.420720577, +0.494389415, +0.644439936, +0.420720577
208call setKnnSorted(dismat, k = 2)
209dismat
210+0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000
211+0.558621846E-1, +0.921224356E-1, +0.463901758E-1, +0.921224356E-1, +0.463901758E-1, +0.131596923, +0.558621846E-1
212+0.175921202, +0.131596923, +0.120059013, +0.223719358, +0.736688375E-1, +0.223719358, +0.120059013
213+0.129531026, +0.456980824, +0.175921202, +0.364858389, +0.129531026, +0.588577747, +0.736688375E-1
214+0.364858389, +0.586511850, +0.632902026, +0.494389415, +0.586511850, +0.718108714, +0.420720577
215+0.588577747, +0.632902026, +0.764498889, +0.540779591, +0.718108714, +0.764498889, +0.644439936
216+0.456980824, +0.512843013, +0.540779591, +0.420720577, +0.494389415, +0.644439936, +0.512843013
217dismat = getDisMatEuclid(point)
218dismat
219+0.00000000, +0.456980824, +0.175921202, +0.364858389, +0.129531026, +0.588577747, +0.558621846E-1
220+0.456980824, +0.00000000, +0.632902026, +0.921224356E-1, +0.586511850, +0.131596923, +0.512843013
221+0.175921202, +0.632902026, +0.00000000, +0.540779591, +0.463901758E-1, +0.764498889, +0.120059013
222+0.364858389, +0.921224356E-1, +0.540779591, +0.00000000, +0.494389415, +0.223719358, +0.420720577
223+0.129531026, +0.586511850, +0.463901758E-1, +0.494389415, +0.00000000, +0.718108714, +0.736688375E-1
224+0.588577747, +0.131596923, +0.764498889, +0.223719358, +0.718108714, +0.00000000, +0.644439936
225+0.558621846E-1, +0.512843013, +0.120059013, +0.420720577, +0.736688375E-1, +0.644439936, +0.00000000
226call setResized(rank, shape(dismat))
227call setKnnSorted(dismat, rank)
228dismat
229+0.00000000, +0.456980824, +0.175921202, +0.364858389, +0.129531026, +0.588577747, +0.558621846E-1
230+0.456980824, +0.00000000, +0.632902026, +0.921224356E-1, +0.586511850, +0.131596923, +0.512843013
231+0.175921202, +0.632902026, +0.00000000, +0.540779591, +0.463901758E-1, +0.764498889, +0.120059013
232+0.364858389, +0.921224356E-1, +0.540779591, +0.00000000, +0.494389415, +0.223719358, +0.420720577
233+0.129531026, +0.586511850, +0.463901758E-1, +0.494389415, +0.00000000, +0.718108714, +0.736688375E-1
234+0.588577747, +0.131596923, +0.764498889, +0.223719358, +0.718108714, +0.00000000, +0.644439936
235+0.558621846E-1, +0.512843013, +0.120059013, +0.420720577, +0.736688375E-1, +0.644439936, +0.00000000
236rank
237+1, +2, +3, +4, +5, +6, +7
238+7, +4, +5, +2, +3, +2, +1
239+5, +6, +7, +6, +7, +4, +5
240+3, +1, +1, +1, +1, +1, +3
241+4, +7, +4, +7, +4, +7, +4
242+2, +5, +2, +5, +2, +5, +2
243+6, +3, +6, +3, +6, +3, +6
244
245dismat = getDisMatEuclid(rdpack, uppLow, point) ! drop the zero-valued diagonal elements of the dismat matrix.
246dismat
247+0.456980824, +0.456980824, +0.175921202, +0.364858389, +0.129531026, +0.588577747, +0.558621846E-1
248+0.175921202, +0.632902026, +0.632902026, +0.921224356E-1, +0.586511850, +0.131596923, +0.512843013
249+0.364858389, +0.921224356E-1, +0.540779591, +0.540779591, +0.463901758E-1, +0.764498889, +0.120059013
250+0.129531026, +0.586511850, +0.463901758E-1, +0.494389415, +0.494389415, +0.223719358, +0.420720577
251+0.588577747, +0.131596923, +0.764498889, +0.223719358, +0.718108714, +0.718108714, +0.736688375E-1
252+0.558621846E-1, +0.512843013, +0.120059013, +0.420720577, +0.736688375E-1, +0.644439936, +0.644439936
253call setKnnSorted(dismat, k = 1)
254dismat
255+0.558621846E-1, +0.921224356E-1, +0.463901758E-1, +0.921224356E-1, +0.463901758E-1, +0.131596923, +0.558621846E-1
256+0.129531026, +0.131596923, +0.120059013, +0.223719358, +0.736688375E-1, +0.223719358, +0.736688375E-1
257+0.175921202, +0.456980824, +0.175921202, +0.364858389, +0.586511850, +0.588577747, +0.120059013
258+0.364858389, +0.586511850, +0.632902026, +0.420720577, +0.494389415, +0.644439936, +0.420720577
259+0.588577747, +0.632902026, +0.764498889, +0.494389415, +0.718108714, +0.718108714, +0.512843013
260+0.456980824, +0.512843013, +0.540779591, +0.540779591, +0.129531026, +0.764498889, +0.644439936
261dismat = getDisMatEuclid(rdpack, uppLow, point) ! drop the zero-valued diagonal elements of the dismat matrix.
262dismat
263+0.456980824, +0.456980824, +0.175921202, +0.364858389, +0.129531026, +0.588577747, +0.558621846E-1
264+0.175921202, +0.632902026, +0.632902026, +0.921224356E-1, +0.586511850, +0.131596923, +0.512843013
265+0.364858389, +0.921224356E-1, +0.540779591, +0.540779591, +0.463901758E-1, +0.764498889, +0.120059013
266+0.129531026, +0.586511850, +0.463901758E-1, +0.494389415, +0.494389415, +0.223719358, +0.420720577
267+0.588577747, +0.131596923, +0.764498889, +0.223719358, +0.718108714, +0.718108714, +0.736688375E-1
268+0.558621846E-1, +0.512843013, +0.120059013, +0.420720577, +0.736688375E-1, +0.644439936, +0.644439936
269call setResized(rank, shape(dismat))
270call setKnnSorted(dismat, rank)
271dismat
272+0.456980824, +0.456980824, +0.175921202, +0.364858389, +0.129531026, +0.588577747, +0.558621846E-1
273+0.175921202, +0.632902026, +0.632902026, +0.921224356E-1, +0.586511850, +0.131596923, +0.512843013
274+0.364858389, +0.921224356E-1, +0.540779591, +0.540779591, +0.463901758E-1, +0.764498889, +0.120059013
275+0.129531026, +0.586511850, +0.463901758E-1, +0.494389415, +0.494389415, +0.223719358, +0.420720577
276+0.588577747, +0.131596923, +0.764498889, +0.223719358, +0.718108714, +0.718108714, +0.736688375E-1
277+0.558621846E-1, +0.512843013, +0.120059013, +0.420720577, +0.736688375E-1, +0.644439936, +0.644439936
278rank
279+6, +3, +4, +2, +3, +2, +1
280+4, +5, +6, +5, +6, +4, +5
281+2, +1, +1, +1, +1, +1, +3
282+3, +6, +3, +6, +4, +6, +4
283+1, +4, +2, +4, +2, +5, +2
284+5, +2, +5, +3, +5, +3, +6
285
286
287npnt = getUnifRand(1, 3); nref = getUnifRand(5, 7)
288[npnt, nref]
289+1, +7
290point = getUnifRand(1._RKG, 2._RKG, npnt, nref)
291point
292+1.13824761, +1.50458205, +1.82756448, +1.93361890, +1.94365978, +1.72362685, +1.58938193
293dismat = getDisMatEuclid(point)
294dismat
295+0.00000000, +0.366334438, +0.689316869, +0.795371234, +0.805412173, +0.585379243, +0.451134324
296+0.366334438, +0.00000000, +0.322982430, +0.429036856, +0.439077735, +0.219044805, +0.847998857E-1
297+0.689316869, +0.322982430, +0.00000000, +0.106054425, +0.116095304, +0.103937626, +0.238182545
298+0.795371234, +0.429036856, +0.106054425, +0.00000000, +0.100408792E-1, +0.209992051, +0.344236970
299+0.805412173, +0.439077735, +0.116095304, +0.100408792E-1, +0.00000000, +0.220032915, +0.354277849
300+0.585379243, +0.219044805, +0.103937626, +0.209992051, +0.220032915, +0.00000000, +0.134244919
301+0.451134324, +0.847998857E-1, +0.238182545, +0.344236970, +0.354277849, +0.134244919, +0.00000000
302call setKnnSorted(dismat, k = 1)
303dismat
304+0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000
305+0.366334438, +0.847998857E-1, +0.103937626, +0.100408792E-1, +0.100408792E-1, +0.103937626, +0.847998857E-1
306+0.451134324, +0.322982430, +0.106054425, +0.106054425, +0.116095304, +0.134244919, +0.238182545
307+0.689316869, +0.219044805, +0.116095304, +0.209992051, +0.220032915, +0.209992051, +0.134244919
308+0.805412173, +0.366334438, +0.238182545, +0.344236970, +0.354277849, +0.220032915, +0.344236970
309+0.585379243, +0.439077735, +0.322982430, +0.429036856, +0.439077735, +0.219044805, +0.354277849
310+0.795371234, +0.429036856, +0.689316869, +0.795371234, +0.805412173, +0.585379243, +0.451134324
311call setKnnSorted(dismat, k = 2)
312dismat
313+0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000
314+0.366334438, +0.847998857E-1, +0.103937626, +0.100408792E-1, +0.100408792E-1, +0.103937626, +0.847998857E-1
315+0.451134324, +0.219044805, +0.106054425, +0.106054425, +0.116095304, +0.134244919, +0.134244919
316+0.585379243, +0.322982430, +0.116095304, +0.209992051, +0.220032915, +0.209992051, +0.238182545
317+0.689316869, +0.366334438, +0.238182545, +0.344236970, +0.354277849, +0.220032915, +0.344236970
318+0.805412173, +0.439077735, +0.322982430, +0.429036856, +0.439077735, +0.219044805, +0.354277849
319+0.795371234, +0.429036856, +0.689316869, +0.795371234, +0.805412173, +0.585379243, +0.451134324
320dismat = getDisMatEuclid(point)
321dismat
322+0.00000000, +0.366334438, +0.689316869, +0.795371234, +0.805412173, +0.585379243, +0.451134324
323+0.366334438, +0.00000000, +0.322982430, +0.429036856, +0.439077735, +0.219044805, +0.847998857E-1
324+0.689316869, +0.322982430, +0.00000000, +0.106054425, +0.116095304, +0.103937626, +0.238182545
325+0.795371234, +0.429036856, +0.106054425, +0.00000000, +0.100408792E-1, +0.209992051, +0.344236970
326+0.805412173, +0.439077735, +0.116095304, +0.100408792E-1, +0.00000000, +0.220032915, +0.354277849
327+0.585379243, +0.219044805, +0.103937626, +0.209992051, +0.220032915, +0.00000000, +0.134244919
328+0.451134324, +0.847998857E-1, +0.238182545, +0.344236970, +0.354277849, +0.134244919, +0.00000000
329call setResized(rank, shape(dismat))
330call setKnnSorted(dismat, rank)
331dismat
332+0.00000000, +0.366334438, +0.689316869, +0.795371234, +0.805412173, +0.585379243, +0.451134324
333+0.366334438, +0.00000000, +0.322982430, +0.429036856, +0.439077735, +0.219044805, +0.847998857E-1
334+0.689316869, +0.322982430, +0.00000000, +0.106054425, +0.116095304, +0.103937626, +0.238182545
335+0.795371234, +0.429036856, +0.106054425, +0.00000000, +0.100408792E-1, +0.209992051, +0.344236970
336+0.805412173, +0.439077735, +0.116095304, +0.100408792E-1, +0.00000000, +0.220032915, +0.354277849
337+0.585379243, +0.219044805, +0.103937626, +0.209992051, +0.220032915, +0.00000000, +0.134244919
338+0.451134324, +0.847998857E-1, +0.238182545, +0.344236970, +0.354277849, +0.134244919, +0.00000000
339rank
340+1, +2, +3, +4, +5, +6, +7
341+2, +7, +6, +5, +4, +3, +2
342+7, +6, +4, +3, +3, +7, +6
343+6, +3, +5, +6, +6, +4, +3
344+3, +1, +7, +7, +7, +2, +4
345+4, +4, +2, +2, +2, +5, +5
346+5, +5, +1, +1, +1, +1, +1
347
348dismat = getDisMatEuclid(rdpack, uppLow, point) ! drop the zero-valued diagonal elements of the dismat matrix.
349dismat
350+0.366334438, +0.366334438, +0.689316869, +0.795371234, +0.805412173, +0.585379243, +0.451134324
351+0.689316869, +0.322982430, +0.322982430, +0.429036856, +0.439077735, +0.219044805, +0.847998857E-1
352+0.795371234, +0.429036856, +0.106054425, +0.106054425, +0.116095304, +0.103937626, +0.238182545
353+0.805412173, +0.439077735, +0.116095304, +0.100408792E-1, +0.100408792E-1, +0.209992051, +0.344236970
354+0.585379243, +0.219044805, +0.103937626, +0.209992051, +0.220032915, +0.220032915, +0.354277849
355+0.451134324, +0.847998857E-1, +0.238182545, +0.344236970, +0.354277849, +0.134244919, +0.134244919
356call setKnnSorted(dismat, k = 1)
357dismat
358+0.366334438, +0.847998857E-1, +0.103937626, +0.100408792E-1, +0.100408792E-1, +0.103937626, +0.847998857E-1
359+0.451134324, +0.219044805, +0.106054425, +0.106054425, +0.116095304, +0.134244919, +0.134244919
360+0.689316869, +0.322982430, +0.116095304, +0.209992051, +0.220032915, +0.219044805, +0.238182545
361+0.805412173, +0.366334438, +0.238182545, +0.344236970, +0.354277849, +0.209992051, +0.344236970
362+0.585379243, +0.439077735, +0.322982430, +0.429036856, +0.439077735, +0.220032915, +0.354277849
363+0.795371234, +0.429036856, +0.689316869, +0.795371234, +0.805412173, +0.585379243, +0.451134324
364dismat = getDisMatEuclid(rdpack, uppLow, point) ! drop the zero-valued diagonal elements of the dismat matrix.
365dismat
366+0.366334438, +0.366334438, +0.689316869, +0.795371234, +0.805412173, +0.585379243, +0.451134324
367+0.689316869, +0.322982430, +0.322982430, +0.429036856, +0.439077735, +0.219044805, +0.847998857E-1
368+0.795371234, +0.429036856, +0.106054425, +0.106054425, +0.116095304, +0.103937626, +0.238182545
369+0.805412173, +0.439077735, +0.116095304, +0.100408792E-1, +0.100408792E-1, +0.209992051, +0.344236970
370+0.585379243, +0.219044805, +0.103937626, +0.209992051, +0.220032915, +0.220032915, +0.354277849
371+0.451134324, +0.847998857E-1, +0.238182545, +0.344236970, +0.354277849, +0.134244919, +0.134244919
372call setResized(rank, shape(dismat))
373call setKnnSorted(dismat, rank)
374dismat
375+0.366334438, +0.366334438, +0.689316869, +0.795371234, +0.805412173, +0.585379243, +0.451134324
376+0.689316869, +0.322982430, +0.322982430, +0.429036856, +0.439077735, +0.219044805, +0.847998857E-1
377+0.795371234, +0.429036856, +0.106054425, +0.106054425, +0.116095304, +0.103937626, +0.238182545
378+0.805412173, +0.439077735, +0.116095304, +0.100408792E-1, +0.100408792E-1, +0.209992051, +0.344236970
379+0.585379243, +0.219044805, +0.103937626, +0.209992051, +0.220032915, +0.220032915, +0.354277849
380+0.451134324, +0.847998857E-1, +0.238182545, +0.344236970, +0.354277849, +0.134244919, +0.134244919
381rank
382+1, +6, +5, +4, +4, +3, +2
383+6, +5, +3, +3, +3, +6, +6
384+5, +2, +4, +5, +5, +4, +3
385+2, +1, +6, +6, +6, +2, +4
386+3, +3, +2, +2, +2, +5, +5
387+4, +4, +1, +1, +1, +1, +1
388
389
390npnt = getUnifRand(1, 3); nref = getUnifRand(5, 7)
391[npnt, nref]
392+1, +6
393point = getUnifRand(1._RKG, 2._RKG, npnt, nref)
394point
395+1.83875871, +1.04778540, +1.67640662, +1.75058246, +1.10400963, +1.96462631
396dismat = getDisMatEuclid(point)
397dismat
398+0.00000000, +0.790973306, +0.162352085, +0.881762505E-1, +0.734749079, +0.125867605
399+0.790973306, +0.00000000, +0.628621221, +0.702797055, +0.562242270E-1, +0.916840911
400+0.162352085, +0.628621221, +0.00000000, +0.741758347E-1, +0.572396994, +0.288219690
401+0.881762505E-1, +0.702797055, +0.741758347E-1, +0.00000000, +0.646572828, +0.214043856
402+0.734749079, +0.562242270E-1, +0.572396994, +0.646572828, +0.00000000, +0.860616684
403+0.125867605, +0.916840911, +0.288219690, +0.214043856, +0.860616684, +0.00000000
404call setKnnSorted(dismat, k = 1)
405dismat
406+0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000
407+0.881762505E-1, +0.562242270E-1, +0.741758347E-1, +0.741758347E-1, +0.562242270E-1, +0.125867605
408+0.125867605, +0.628621221, +0.162352085, +0.881762505E-1, +0.572396994, +0.916840911
409+0.790973306, +0.702797055, +0.628621221, +0.702797055, +0.646572828, +0.214043856
410+0.734749079, +0.790973306, +0.572396994, +0.646572828, +0.734749079, +0.860616684
411+0.162352085, +0.916840911, +0.288219690, +0.214043856, +0.860616684, +0.288219690
412call setKnnSorted(dismat, k = 2)
413dismat
414+0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000, +0.00000000
415+0.881762505E-1, +0.562242270E-1, +0.741758347E-1, +0.741758347E-1, +0.562242270E-1, +0.125867605
416+0.125867605, +0.628621221, +0.162352085, +0.881762505E-1, +0.572396994, +0.214043856
417+0.790973306, +0.702797055, +0.628621221, +0.702797055, +0.646572828, +0.288219690
418+0.734749079, +0.790973306, +0.572396994, +0.646572828, +0.734749079, +0.860616684
419+0.162352085, +0.916840911, +0.288219690, +0.214043856, +0.860616684, +0.916840911
420dismat = getDisMatEuclid(point)
421dismat
422+0.00000000, +0.790973306, +0.162352085, +0.881762505E-1, +0.734749079, +0.125867605
423+0.790973306, +0.00000000, +0.628621221, +0.702797055, +0.562242270E-1, +0.916840911
424+0.162352085, +0.628621221, +0.00000000, +0.741758347E-1, +0.572396994, +0.288219690
425+0.881762505E-1, +0.702797055, +0.741758347E-1, +0.00000000, +0.646572828, +0.214043856
426+0.734749079, +0.562242270E-1, +0.572396994, +0.646572828, +0.00000000, +0.860616684
427+0.125867605, +0.916840911, +0.288219690, +0.214043856, +0.860616684, +0.00000000
428call setResized(rank, shape(dismat))
429call setKnnSorted(dismat, rank)
430dismat
431+0.00000000, +0.790973306, +0.162352085, +0.881762505E-1, +0.734749079, +0.125867605
432+0.790973306, +0.00000000, +0.628621221, +0.702797055, +0.562242270E-1, +0.916840911
433+0.162352085, +0.628621221, +0.00000000, +0.741758347E-1, +0.572396994, +0.288219690
434+0.881762505E-1, +0.702797055, +0.741758347E-1, +0.00000000, +0.646572828, +0.214043856
435+0.734749079, +0.562242270E-1, +0.572396994, +0.646572828, +0.00000000, +0.860616684
436+0.125867605, +0.916840911, +0.288219690, +0.214043856, +0.860616684, +0.00000000
437rank
438+1, +2, +3, +4, +5, +6
439+4, +5, +4, +3, +2, +1
440+6, +3, +1, +1, +3, +4
441+3, +4, +6, +6, +4, +3
442+5, +1, +5, +5, +1, +5
443+2, +6, +2, +2, +6, +2
444
445dismat = getDisMatEuclid(rdpack, uppLow, point) ! drop the zero-valued diagonal elements of the dismat matrix.
446dismat
447+0.790973306, +0.790973306, +0.162352085, +0.881762505E-1, +0.734749079, +0.125867605
448+0.162352085, +0.628621221, +0.628621221, +0.702797055, +0.562242270E-1, +0.916840911
449+0.881762505E-1, +0.702797055, +0.741758347E-1, +0.741758347E-1, +0.572396994, +0.288219690
450+0.734749079, +0.562242270E-1, +0.572396994, +0.646572828, +0.646572828, +0.214043856
451+0.125867605, +0.916840911, +0.288219690, +0.214043856, +0.860616684, +0.860616684
452call setKnnSorted(dismat, k = 1)
453dismat
454+0.881762505E-1, +0.562242270E-1, +0.741758347E-1, +0.741758347E-1, +0.562242270E-1, +0.125867605
455+0.125867605, +0.628621221, +0.162352085, +0.881762505E-1, +0.572396994, +0.214043856
456+0.162352085, +0.702797055, +0.628621221, +0.702797055, +0.646572828, +0.288219690
457+0.734749079, +0.790973306, +0.572396994, +0.646572828, +0.734749079, +0.916840911
458+0.790973306, +0.916840911, +0.288219690, +0.214043856, +0.860616684, +0.860616684
459dismat = getDisMatEuclid(rdpack, uppLow, point) ! drop the zero-valued diagonal elements of the dismat matrix.
460dismat
461+0.790973306, +0.790973306, +0.162352085, +0.881762505E-1, +0.734749079, +0.125867605
462+0.162352085, +0.628621221, +0.628621221, +0.702797055, +0.562242270E-1, +0.916840911
463+0.881762505E-1, +0.702797055, +0.741758347E-1, +0.741758347E-1, +0.572396994, +0.288219690
464+0.734749079, +0.562242270E-1, +0.572396994, +0.646572828, +0.646572828, +0.214043856
465+0.125867605, +0.916840911, +0.288219690, +0.214043856, +0.860616684, +0.860616684
466call setResized(rank, shape(dismat))
467call setKnnSorted(dismat, rank)
468dismat
469+0.790973306, +0.790973306, +0.162352085, +0.881762505E-1, +0.734749079, +0.125867605
470+0.162352085, +0.628621221, +0.628621221, +0.702797055, +0.562242270E-1, +0.916840911
471+0.881762505E-1, +0.702797055, +0.741758347E-1, +0.741758347E-1, +0.572396994, +0.288219690
472+0.734749079, +0.562242270E-1, +0.572396994, +0.646572828, +0.646572828, +0.214043856
473+0.125867605, +0.916840911, +0.288219690, +0.214043856, +0.860616684, +0.860616684
474rank
475+3, +4, +3, +3, +2, +1
476+5, +2, +1, +1, +3, +4
477+2, +3, +5, +5, +4, +3
478+4, +1, +4, +4, +1, +5
479+1, +5, +2, +2, +5, +2
480
481
Test:
test_pm_knn
Todo:
High Priority: This generic interface should be extended to support discrete distance matrices.


Final Remarks


If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.

  1. If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
  2. If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.

This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.

Author:
Fatemeh Bagheri, Thursday 8:40 PM, July 20, 2023, Dallas, TX Amir Shahmoradi, Saturday 1:00 AM, September, 1, 2018, Dallas, TX

Definition at line 181 of file pm_knn.F90.


The documentation for this interface was generated from the following file: