Return the input distance matrix whose columns are sorted in ascending order on output, optionally only up to the k
th row of each column, such that the k
th row in the i
th column is the k
th nearest neighbor to the \(i^{th}\) reference point.
More...
Return the input distance matrix whose columns are sorted in ascending order on output, optionally only up to the k
th row of each column, such that the k
th row in the i
th column is the k
th 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
-
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 i th reference point.
For example, such distance matrix can be obtained via:
-
getDisMatEuclid or setDisMatEuclid
or any other distance metric module of the library.
-
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 k th row in column i contains the distance of the k th nearest neighbor of reference(1:ndim, i) represented by column distance(1:npnt, i) .
-
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 k th 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 ⛓
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,...
This module contains procedures and generic interfaces for computing the nearest neighbor statistics ...
- 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 ⛓
12 integer(IK) :: npnt, nref, itry, ntry
= 5
13 type(display_type) :: disp
17 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
18 call disp%show(
"! Sort a precomputed distance matrix according to the nearest neighbors.")
19 call disp%show(
"!%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
24 integer(IK),
allocatable ::
rank(:,:)
25 real(RKG),
allocatable :: dismat(:,:), point(:,:)
28 call disp%show(
"npnt = getUnifRand(1, 3); nref = getUnifRand(5, 7)")
32 call disp%show(
"point = getUnifRand(1._RKG, 2._RKG, npnt, nref)")
36 call disp%show(
"dismat = getDisMatEuclid(point)")
40 call disp%show(
"call setKnnSorted(dismat, k = 1)")
44 call disp%show(
"call setKnnSorted(dismat, k = 2)")
48 call disp%show(
"dismat = getDisMatEuclid(point)")
52 call disp%show(
"call setResized(rank, shape(dismat))")
54 call disp%show(
"call setKnnSorted(dismat, rank)")
61 call disp%show(
"dismat = getDisMatEuclid(rdpack, uppLow, point) ! drop the zero-valued diagonal elements of the dismat matrix.")
65 call disp%show(
"call setKnnSorted(dismat, k = 1)")
69 call disp%show(
"dismat = getDisMatEuclid(rdpack, uppLow, point) ! drop the zero-valued diagonal elements of the dismat matrix.")
73 call disp%show(
"call setResized(rank, shape(dismat))")
75 call disp%show(
"call setKnnSorted(dismat, rank)")
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.
This is a generic method of the derived type display_type with pass attribute.
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...
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
integer, parameter RKH
The scalar integer constant of intrinsic default kind, representing the highest-precision real kind t...
integer, parameter RKS
The single-precision real kind in Fortran mode. On most platforms, this is an 32-bit real kind.
Generate and return an object of type display_type.
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓
12+1.43204689,
+1.19008255,
+1.64724052,
+1.49888933,
+1.93696427,
+1.82989347
13+1.70187974,
+1.72265720,
+1.75669837,
+1.55251837,
+1.23169208,
+1.58536541
14+1.50525379,
+1.56958437,
+1.14748597,
+1.61878192,
+1.40994740,
+1.14204204
17+0.00000000,
+0.251230717,
+0.421083361,
+0.199161664,
+0.696492136,
+0.551162660
18+0.251230717,
+0.00000000,
+0.623152733,
+0.355990529,
+0.907944441,
+0.781664550
19+0.421083361,
+0.623152733,
+0.00000000,
+0.534618974,
+0.654566646,
+0.250492930
20+0.199161664,
+0.355990529,
+0.534618974,
+0.00000000,
+0.581765413,
+0.581312001
21+0.696492136,
+0.907944441,
+0.654566646,
+0.581765413,
+0.00000000,
+0.456423342
22+0.551162660,
+0.781664550,
+0.250492930,
+0.581312001,
+0.456423342,
+0.00000000
25+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000
26+0.199161664,
+0.251230717,
+0.250492930,
+0.199161664,
+0.456423342,
+0.250492930
27+0.251230717,
+0.355990529,
+0.623152733,
+0.355990529,
+0.581765413,
+0.781664550
28+0.421083361,
+0.623152733,
+0.534618974,
+0.534618974,
+0.654566646,
+0.581312001
29+0.696492136,
+0.907944441,
+0.654566646,
+0.581765413,
+0.907944441,
+0.456423342
30+0.551162660,
+0.781664550,
+0.421083361,
+0.581312001,
+0.696492136,
+0.551162660
33+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000
34+0.199161664,
+0.251230717,
+0.250492930,
+0.199161664,
+0.456423342,
+0.250492930
35+0.251230717,
+0.355990529,
+0.421083361,
+0.355990529,
+0.581765413,
+0.456423342
36+0.421083361,
+0.623152733,
+0.534618974,
+0.534618974,
+0.654566646,
+0.551162660
37+0.696492136,
+0.907944441,
+0.654566646,
+0.581765413,
+0.907944441,
+0.581312001
38+0.551162660,
+0.781664550,
+0.623152733,
+0.581312001,
+0.696492136,
+0.781664550
41+0.00000000,
+0.251230717,
+0.421083361,
+0.199161664,
+0.696492136,
+0.551162660
42+0.251230717,
+0.00000000,
+0.623152733,
+0.355990529,
+0.907944441,
+0.781664550
43+0.421083361,
+0.623152733,
+0.00000000,
+0.534618974,
+0.654566646,
+0.250492930
44+0.199161664,
+0.355990529,
+0.534618974,
+0.00000000,
+0.581765413,
+0.581312001
45+0.696492136,
+0.907944441,
+0.654566646,
+0.581765413,
+0.00000000,
+0.456423342
46+0.551162660,
+0.781664550,
+0.250492930,
+0.581312001,
+0.456423342,
+0.00000000
50+0.00000000,
+0.251230717,
+0.421083361,
+0.199161664,
+0.696492136,
+0.551162660
51+0.251230717,
+0.00000000,
+0.623152733,
+0.355990529,
+0.907944441,
+0.781664550
52+0.421083361,
+0.623152733,
+0.00000000,
+0.534618974,
+0.654566646,
+0.250492930
53+0.199161664,
+0.355990529,
+0.534618974,
+0.00000000,
+0.581765413,
+0.581312001
54+0.696492136,
+0.907944441,
+0.654566646,
+0.581765413,
+0.00000000,
+0.456423342
55+0.551162660,
+0.781664550,
+0.250492930,
+0.581312001,
+0.456423342,
+0.00000000
66+0.251230717,
+0.251230717,
+0.421083361,
+0.199161664,
+0.696492136,
+0.551162660
67+0.421083361,
+0.623152733,
+0.623152733,
+0.355990529,
+0.907944441,
+0.781664550
68+0.199161664,
+0.355990529,
+0.534618974,
+0.534618974,
+0.654566646,
+0.250492930
69+0.696492136,
+0.907944441,
+0.654566646,
+0.581765413,
+0.581765413,
+0.581312001
70+0.551162660,
+0.781664550,
+0.250492930,
+0.581312001,
+0.456423342,
+0.456423342
73+0.199161664,
+0.251230717,
+0.250492930,
+0.199161664,
+0.456423342,
+0.250492930
74+0.251230717,
+0.355990529,
+0.421083361,
+0.355990529,
+0.581765413,
+0.456423342
75+0.421083361,
+0.623152733,
+0.623152733,
+0.534618974,
+0.654566646,
+0.781664550
76+0.696492136,
+0.907944441,
+0.654566646,
+0.581765413,
+0.907944441,
+0.581312001
77+0.551162660,
+0.781664550,
+0.534618974,
+0.581312001,
+0.696492136,
+0.551162660
80+0.251230717,
+0.251230717,
+0.421083361,
+0.199161664,
+0.696492136,
+0.551162660
81+0.421083361,
+0.623152733,
+0.623152733,
+0.355990529,
+0.907944441,
+0.781664550
82+0.199161664,
+0.355990529,
+0.534618974,
+0.534618974,
+0.654566646,
+0.250492930
83+0.696492136,
+0.907944441,
+0.654566646,
+0.581765413,
+0.581765413,
+0.581312001
84+0.551162660,
+0.781664550,
+0.250492930,
+0.581312001,
+0.456423342,
+0.456423342
88+0.251230717,
+0.251230717,
+0.421083361,
+0.199161664,
+0.696492136,
+0.551162660
89+0.421083361,
+0.623152733,
+0.623152733,
+0.355990529,
+0.907944441,
+0.781664550
90+0.199161664,
+0.355990529,
+0.534618974,
+0.534618974,
+0.654566646,
+0.250492930
91+0.696492136,
+0.907944441,
+0.654566646,
+0.581765413,
+0.581765413,
+0.581312001
92+0.551162660,
+0.781664550,
+0.250492930,
+0.581312001,
+0.456423342,
+0.456423342
106+1.32560205,
+1.02266192,
+1.25533628,
+1.73648643,
+1.64236033,
+1.55406213
107+1.65914297,
+1.47304463,
+1.90322745,
+1.04094779,
+1.04590237,
+1.83482695
108+1.45213532,
+1.32187223,
+1.68931150,
+1.16542017,
+1.04012775,
+1.63469553
111+0.00000000,
+0.378647327,
+0.347515553,
+0.795736670,
+0.803834558,
+0.341155529
112+0.378647327,
+0.00000000,
+0.611723959,
+0.848958313,
+0.803651989,
+0.714934289
113+0.347515553,
+0.611723959,
+0.00000000,
+1.11780763,
+1.14290559,
+0.311285526
114+0.795736670,
+0.848958313,
+1.11780763,
+0.00000000,
+0.156787947,
+0.940075576
115+0.803834558,
+0.803651989,
+1.14290559,
+0.156787947,
+0.00000000,
+0.991821289
116+0.341155529,
+0.714934289,
+0.311285526,
+0.940075576,
+0.991821289,
+0.00000000
119+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000
120+0.341155529,
+0.378647327,
+0.311285526,
+0.156787947,
+0.156787947,
+0.311285526
121+0.378647327,
+0.611723959,
+0.611723959,
+0.848958313,
+0.803651989,
+0.714934289
122+0.795736670,
+0.848958313,
+1.11780763,
+0.795736670,
+0.803834558,
+0.940075576
123+0.803834558,
+0.803651989,
+1.14290559,
+0.940075576,
+0.991821289,
+0.991821289
124+0.347515553,
+0.714934289,
+0.347515553,
+1.11780763,
+1.14290559,
+0.341155529
127+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000
128+0.341155529,
+0.378647327,
+0.311285526,
+0.156787947,
+0.156787947,
+0.311285526
129+0.347515553,
+0.611723959,
+0.347515553,
+0.795736670,
+0.803651989,
+0.341155529
130+0.795736670,
+0.848958313,
+1.11780763,
+0.848958313,
+0.803834558,
+0.940075576
131+0.803834558,
+0.803651989,
+1.14290559,
+0.940075576,
+0.991821289,
+0.991821289
132+0.378647327,
+0.714934289,
+0.611723959,
+1.11780763,
+1.14290559,
+0.714934289
135+0.00000000,
+0.378647327,
+0.347515553,
+0.795736670,
+0.803834558,
+0.341155529
136+0.378647327,
+0.00000000,
+0.611723959,
+0.848958313,
+0.803651989,
+0.714934289
137+0.347515553,
+0.611723959,
+0.00000000,
+1.11780763,
+1.14290559,
+0.311285526
138+0.795736670,
+0.848958313,
+1.11780763,
+0.00000000,
+0.156787947,
+0.940075576
139+0.803834558,
+0.803651989,
+1.14290559,
+0.156787947,
+0.00000000,
+0.991821289
140+0.341155529,
+0.714934289,
+0.311285526,
+0.940075576,
+0.991821289,
+0.00000000
144+0.00000000,
+0.378647327,
+0.347515553,
+0.795736670,
+0.803834558,
+0.341155529
145+0.378647327,
+0.00000000,
+0.611723959,
+0.848958313,
+0.803651989,
+0.714934289
146+0.347515553,
+0.611723959,
+0.00000000,
+1.11780763,
+1.14290559,
+0.311285526
147+0.795736670,
+0.848958313,
+1.11780763,
+0.00000000,
+0.156787947,
+0.940075576
148+0.803834558,
+0.803651989,
+1.14290559,
+0.156787947,
+0.00000000,
+0.991821289
149+0.341155529,
+0.714934289,
+0.311285526,
+0.940075576,
+0.991821289,
+0.00000000
151+1,
+2,
+3,
+4,
+5,
+6
152+6,
+1,
+6,
+5,
+4,
+3
153+3,
+3,
+1,
+1,
+2,
+1
154+2,
+6,
+2,
+2,
+1,
+2
155+4,
+5,
+4,
+6,
+6,
+4
156+5,
+4,
+5,
+3,
+3,
+5
160+0.378647327,
+0.378647327,
+0.347515553,
+0.795736670,
+0.803834558,
+0.341155529
161+0.347515553,
+0.611723959,
+0.611723959,
+0.848958313,
+0.803651989,
+0.714934289
162+0.795736670,
+0.848958313,
+1.11780763,
+1.11780763,
+1.14290559,
+0.311285526
163+0.803834558,
+0.803651989,
+1.14290559,
+0.156787947,
+0.156787947,
+0.940075576
164+0.341155529,
+0.714934289,
+0.311285526,
+0.940075576,
+0.991821289,
+0.991821289
167+0.341155529,
+0.378647327,
+0.311285526,
+0.156787947,
+0.156787947,
+0.311285526
168+0.347515553,
+0.611723959,
+0.347515553,
+0.795736670,
+0.803651989,
+0.341155529
169+0.378647327,
+0.714934289,
+0.611723959,
+0.848958313,
+0.803834558,
+0.714934289
170+0.803834558,
+0.803651989,
+1.14290559,
+0.940075576,
+0.991821289,
+0.940075576
171+0.795736670,
+0.848958313,
+1.11780763,
+1.11780763,
+1.14290559,
+0.991821289
174+0.378647327,
+0.378647327,
+0.347515553,
+0.795736670,
+0.803834558,
+0.341155529
175+0.347515553,
+0.611723959,
+0.611723959,
+0.848958313,
+0.803651989,
+0.714934289
176+0.795736670,
+0.848958313,
+1.11780763,
+1.11780763,
+1.14290559,
+0.311285526
177+0.803834558,
+0.803651989,
+1.14290559,
+0.156787947,
+0.156787947,
+0.940075576
178+0.341155529,
+0.714934289,
+0.311285526,
+0.940075576,
+0.991821289,
+0.991821289
182+0.378647327,
+0.378647327,
+0.347515553,
+0.795736670,
+0.803834558,
+0.341155529
183+0.347515553,
+0.611723959,
+0.611723959,
+0.848958313,
+0.803651989,
+0.714934289
184+0.795736670,
+0.848958313,
+1.11780763,
+1.11780763,
+1.14290559,
+0.311285526
185+0.803834558,
+0.803651989,
+1.14290559,
+0.156787947,
+0.156787947,
+0.940075576
186+0.341155529,
+0.714934289,
+0.311285526,
+0.940075576,
+0.991821289,
+0.991821289
188+5,
+1,
+5,
+4,
+4,
+3
189+2,
+2,
+1,
+1,
+2,
+1
190+1,
+5,
+2,
+2,
+1,
+2
191+3,
+4,
+3,
+5,
+5,
+4
192+4,
+3,
+4,
+3,
+3,
+5
200+1.75428414,
+1.35725904,
+1.14576936,
+1.67224753,
+1.56387782
203+0.00000000,
+0.397025079,
+0.608514786,
+0.820366144E-1,
+0.190406322
204+0.397025079,
+0.00000000,
+0.211489677,
+0.314988494,
+0.206618786
205+0.608514786,
+0.211489677,
+0.00000000,
+0.526478171,
+0.418108463
206+0.820366144E-1,
+0.314988494,
+0.526478171,
+0.00000000,
+0.108369708
207+0.190406322,
+0.206618786,
+0.418108463,
+0.108369708,
+0.00000000
210+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000
211+0.820366144E-1,
+0.206618786,
+0.211489677,
+0.820366144E-1,
+0.108369708
212+0.190406322,
+0.211489677,
+0.418108463,
+0.108369708,
+0.190406322
213+0.397025079,
+0.314988494,
+0.526478171,
+0.314988494,
+0.206618786
214+0.608514786,
+0.397025079,
+0.608514786,
+0.526478171,
+0.418108463
217+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000
218+0.820366144E-1,
+0.206618786,
+0.211489677,
+0.820366144E-1,
+0.108369708
219+0.190406322,
+0.211489677,
+0.418108463,
+0.108369708,
+0.190406322
220+0.397025079,
+0.314988494,
+0.526478171,
+0.314988494,
+0.206618786
221+0.608514786,
+0.397025079,
+0.608514786,
+0.526478171,
+0.418108463
224+0.00000000,
+0.397025079,
+0.608514786,
+0.820366144E-1,
+0.190406322
225+0.397025079,
+0.00000000,
+0.211489677,
+0.314988494,
+0.206618786
226+0.608514786,
+0.211489677,
+0.00000000,
+0.526478171,
+0.418108463
227+0.820366144E-1,
+0.314988494,
+0.526478171,
+0.00000000,
+0.108369708
228+0.190406322,
+0.206618786,
+0.418108463,
+0.108369708,
+0.00000000
232+0.00000000,
+0.397025079,
+0.608514786,
+0.820366144E-1,
+0.190406322
233+0.397025079,
+0.00000000,
+0.211489677,
+0.314988494,
+0.206618786
234+0.608514786,
+0.211489677,
+0.00000000,
+0.526478171,
+0.418108463
235+0.820366144E-1,
+0.314988494,
+0.526478171,
+0.00000000,
+0.108369708
236+0.190406322,
+0.206618786,
+0.418108463,
+0.108369708,
+0.00000000
246+0.397025079,
+0.397025079,
+0.608514786,
+0.820366144E-1,
+0.190406322
247+0.608514786,
+0.211489677,
+0.211489677,
+0.314988494,
+0.206618786
248+0.820366144E-1,
+0.314988494,
+0.526478171,
+0.526478171,
+0.418108463
249+0.190406322,
+0.206618786,
+0.418108463,
+0.108369708,
+0.108369708
252+0.820366144E-1,
+0.206618786,
+0.211489677,
+0.820366144E-1,
+0.108369708
253+0.190406322,
+0.211489677,
+0.418108463,
+0.108369708,
+0.190406322
254+0.397025079,
+0.314988494,
+0.526478171,
+0.526478171,
+0.418108463
255+0.608514786,
+0.397025079,
+0.608514786,
+0.314988494,
+0.206618786
258+0.397025079,
+0.397025079,
+0.608514786,
+0.820366144E-1,
+0.190406322
259+0.608514786,
+0.211489677,
+0.211489677,
+0.314988494,
+0.206618786
260+0.820366144E-1,
+0.314988494,
+0.526478171,
+0.526478171,
+0.418108463
261+0.190406322,
+0.206618786,
+0.418108463,
+0.108369708,
+0.108369708
265+0.397025079,
+0.397025079,
+0.608514786,
+0.820366144E-1,
+0.190406322
266+0.608514786,
+0.211489677,
+0.211489677,
+0.314988494,
+0.206618786
267+0.820366144E-1,
+0.314988494,
+0.526478171,
+0.526478171,
+0.418108463
268+0.190406322,
+0.206618786,
+0.418108463,
+0.108369708,
+0.108369708
281+1.32593203,
+1.78545368,
+1.99960399,
+1.02113891,
+1.43536305,
+1.13885760,
+1.77757585
282+1.82568300,
+1.88241410,
+1.23005056,
+1.62767661,
+1.98310626,
+1.18339515,
+1.23146415
283+1.72075176,
+1.16353393,
+1.17418659,
+1.66540480,
+1.49088717,
+1.56189442,
+1.69307745
286+0.00000000,
+0.724479258,
+1.05230474,
+0.367652893,
+0.299324185,
+0.687579930,
+0.746889532
287+0.724479258,
+0.00000000,
+0.686696410,
+0.949180007,
+0.489757597,
+1.03218460,
+0.839174747
288+1.05230474,
+0.686696410,
+0.00000000,
+1.16481566,
+0.992854416,
+0.945186973,
+0.564398944
289+0.367652893,
+0.949180007,
+1.16481566,
+0.00000000,
+0.573034286,
+0.471124321,
+0.854369402
290+0.299324185,
+0.489757597,
+0.992854416,
+0.573034286,
+0.00000000,
+0.855859458,
+0.850268364
291+0.687579930,
+1.03218460,
+0.945186973,
+0.471124321,
+0.855859458,
+0.00000000,
+0.653819978
292+0.746889532,
+0.839174747,
+0.564398944,
+0.854369402,
+0.850268364,
+0.653819978,
+0.00000000
295+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000
296+0.299324185,
+0.489757597,
+0.564398944,
+0.367652893,
+0.299324185,
+0.471124321,
+0.564398944
297+0.367652893,
+0.686696410,
+0.945186973,
+1.16481566,
+0.489757597,
+0.653819978,
+0.653819978
298+0.724479258,
+0.724479258,
+0.686696410,
+0.949180007,
+0.573034286,
+1.03218460,
+0.746889532
299+1.05230474,
+0.839174747,
+0.992854416,
+0.573034286,
+0.992854416,
+0.855859458,
+0.850268364
300+0.687579930,
+1.03218460,
+1.05230474,
+0.471124321,
+0.855859458,
+0.945186973,
+0.839174747
301+0.746889532,
+0.949180007,
+1.16481566,
+0.854369402,
+0.850268364,
+0.687579930,
+0.854369402
304+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000
305+0.299324185,
+0.489757597,
+0.564398944,
+0.367652893,
+0.299324185,
+0.471124321,
+0.564398944
306+0.367652893,
+0.686696410,
+0.686696410,
+0.471124321,
+0.489757597,
+0.653819978,
+0.653819978
307+0.687579930,
+0.724479258,
+0.945186973,
+0.573034286,
+0.573034286,
+0.687579930,
+0.746889532
308+0.724479258,
+0.839174747,
+0.992854416,
+0.854369402,
+0.992854416,
+0.855859458,
+0.850268364
309+1.05230474,
+1.03218460,
+1.05230474,
+1.16481566,
+0.855859458,
+0.945186973,
+0.839174747
310+0.746889532,
+0.949180007,
+1.16481566,
+0.949180007,
+0.850268364,
+1.03218460,
+0.854369402
313+0.00000000,
+0.724479258,
+1.05230474,
+0.367652893,
+0.299324185,
+0.687579930,
+0.746889532
314+0.724479258,
+0.00000000,
+0.686696410,
+0.949180007,
+0.489757597,
+1.03218460,
+0.839174747
315+1.05230474,
+0.686696410,
+0.00000000,
+1.16481566,
+0.992854416,
+0.945186973,
+0.564398944
316+0.367652893,
+0.949180007,
+1.16481566,
+0.00000000,
+0.573034286,
+0.471124321,
+0.854369402
317+0.299324185,
+0.489757597,
+0.992854416,
+0.573034286,
+0.00000000,
+0.855859458,
+0.850268364
318+0.687579930,
+1.03218460,
+0.945186973,
+0.471124321,
+0.855859458,
+0.00000000,
+0.653819978
319+0.746889532,
+0.839174747,
+0.564398944,
+0.854369402,
+0.850268364,
+0.653819978,
+0.00000000
323+0.00000000,
+0.724479258,
+1.05230474,
+0.367652893,
+0.299324185,
+0.687579930,
+0.746889532
324+0.724479258,
+0.00000000,
+0.686696410,
+0.949180007,
+0.489757597,
+1.03218460,
+0.839174747
325+1.05230474,
+0.686696410,
+0.00000000,
+1.16481566,
+0.992854416,
+0.945186973,
+0.564398944
326+0.367652893,
+0.949180007,
+1.16481566,
+0.00000000,
+0.573034286,
+0.471124321,
+0.854369402
327+0.299324185,
+0.489757597,
+0.992854416,
+0.573034286,
+0.00000000,
+0.855859458,
+0.850268364
328+0.687579930,
+1.03218460,
+0.945186973,
+0.471124321,
+0.855859458,
+0.00000000,
+0.653819978
329+0.746889532,
+0.839174747,
+0.564398944,
+0.854369402,
+0.850268364,
+0.653819978,
+0.00000000
331+1,
+2,
+3,
+4,
+5,
+6,
+7
332+5,
+5,
+7,
+1,
+1,
+4,
+3
333+4,
+3,
+2,
+6,
+2,
+7,
+6
334+6,
+1,
+6,
+5,
+4,
+1,
+1
335+2,
+7,
+5,
+7,
+7,
+5,
+2
336+7,
+4,
+1,
+2,
+6,
+3,
+5
337+3,
+6,
+4,
+3,
+3,
+2,
+4
341+0.724479258,
+0.724479258,
+1.05230474,
+0.367652893,
+0.299324185,
+0.687579930,
+0.746889532
342+1.05230474,
+0.686696410,
+0.686696410,
+0.949180007,
+0.489757597,
+1.03218460,
+0.839174747
343+0.367652893,
+0.949180007,
+1.16481566,
+1.16481566,
+0.992854416,
+0.945186973,
+0.564398944
344+0.299324185,
+0.489757597,
+0.992854416,
+0.573034286,
+0.573034286,
+0.471124321,
+0.854369402
345+0.687579930,
+1.03218460,
+0.945186973,
+0.471124321,
+0.855859458,
+0.855859458,
+0.850268364
346+0.746889532,
+0.839174747,
+0.564398944,
+0.854369402,
+0.850268364,
+0.653819978,
+0.653819978
349+0.299324185,
+0.489757597,
+0.564398944,
+0.367652893,
+0.299324185,
+0.471124321,
+0.564398944
350+0.367652893,
+0.686696410,
+0.686696410,
+0.471124321,
+0.489757597,
+0.653819978,
+0.653819978
351+0.687579930,
+0.724479258,
+0.945186973,
+0.573034286,
+0.573034286,
+0.687579930,
+0.839174747
352+0.724479258,
+0.839174747,
+0.992854416,
+0.854369402,
+0.850268364,
+1.03218460,
+0.854369402
353+1.05230474,
+1.03218460,
+1.05230474,
+0.949180007,
+0.855859458,
+0.855859458,
+0.850268364
354+0.746889532,
+0.949180007,
+1.16481566,
+1.16481566,
+0.992854416,
+0.945186973,
+0.746889532
357+0.724479258,
+0.724479258,
+1.05230474,
+0.367652893,
+0.299324185,
+0.687579930,
+0.746889532
358+1.05230474,
+0.686696410,
+0.686696410,
+0.949180007,
+0.489757597,
+1.03218460,
+0.839174747
359+0.367652893,
+0.949180007,
+1.16481566,
+1.16481566,
+0.992854416,
+0.945186973,
+0.564398944
360+0.299324185,
+0.489757597,
+0.992854416,
+0.573034286,
+0.573034286,
+0.471124321,
+0.854369402
361+0.687579930,
+1.03218460,
+0.945186973,
+0.471124321,
+0.855859458,
+0.855859458,
+0.850268364
362+0.746889532,
+0.839174747,
+0.564398944,
+0.854369402,
+0.850268364,
+0.653819978,
+0.653819978
366+0.724479258,
+0.724479258,
+1.05230474,
+0.367652893,
+0.299324185,
+0.687579930,
+0.746889532
367+1.05230474,
+0.686696410,
+0.686696410,
+0.949180007,
+0.489757597,
+1.03218460,
+0.839174747
368+0.367652893,
+0.949180007,
+1.16481566,
+1.16481566,
+0.992854416,
+0.945186973,
+0.564398944
369+0.299324185,
+0.489757597,
+0.992854416,
+0.573034286,
+0.573034286,
+0.471124321,
+0.854369402
370+0.687579930,
+1.03218460,
+0.945186973,
+0.471124321,
+0.855859458,
+0.855859458,
+0.850268364
371+0.746889532,
+0.839174747,
+0.564398944,
+0.854369402,
+0.850268364,
+0.653819978,
+0.653819978
373+4,
+4,
+6,
+1,
+1,
+4,
+3
374+3,
+2,
+2,
+5,
+2,
+6,
+6
375+5,
+1,
+5,
+4,
+4,
+1,
+1
376+1,
+6,
+4,
+6,
+6,
+5,
+2
377+6,
+3,
+1,
+2,
+5,
+3,
+5
378+2,
+5,
+3,
+3,
+3,
+2,
+4
386+1.65123200,
+1.43651414,
+1.55307031,
+1.31862080,
+1.36870277,
+1.23046422
387+1.02029622,
+1.29206896,
+1.64531732,
+1.76901364,
+1.02533531,
+1.55754352
388+1.73548675,
+1.33284187,
+1.59259069,
+1.09936333,
+1.62710953,
+1.17945600
391+0.00000000,
+0.531118751,
+0.648618877,
+1.03723729,
+0.302644640,
+0.880255878
392+0.531118751,
+0.00000000,
+0.453695059,
+0.543955266,
+0.402912736,
+0.369405657
393+0.648618877,
+0.453695059,
+0.00000000,
+0.559946954,
+0.647735000,
+0.531468928
394+1.03723729,
+0.543955266,
+0.559946954,
+0.00000000,
+0.913280845,
+0.242705643
395+0.302644640,
+0.402912736,
+0.647735000,
+0.913280845,
+0.00000000,
+0.709048092
396+0.880255878,
+0.369405657,
+0.531468928,
+0.242705643,
+0.709048092,
+0.00000000
399+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000
400+0.302644640,
+0.369405657,
+0.453695059,
+0.242705643,
+0.302644640,
+0.242705643
401+0.531118751,
+0.402912736,
+0.531468928,
+0.543955266,
+0.402912736,
+0.369405657
402+0.648618877,
+0.453695059,
+0.559946954,
+0.559946954,
+0.647735000,
+0.531468928
403+1.03723729,
+0.543955266,
+0.647735000,
+0.913280845,
+0.913280845,
+0.709048092
404+0.880255878,
+0.531118751,
+0.648618877,
+1.03723729,
+0.709048092,
+0.880255878
407+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000,
+0.00000000
408+0.302644640,
+0.369405657,
+0.453695059,
+0.242705643,
+0.302644640,
+0.242705643
409+0.531118751,
+0.402912736,
+0.531468928,
+0.543955266,
+0.402912736,
+0.369405657
410+0.648618877,
+0.453695059,
+0.559946954,
+0.559946954,
+0.647735000,
+0.531468928
411+1.03723729,
+0.543955266,
+0.647735000,
+0.913280845,
+0.913280845,
+0.709048092
412+0.880255878,
+0.531118751,
+0.648618877,
+1.03723729,
+0.709048092,
+0.880255878
415+0.00000000,
+0.531118751,
+0.648618877,
+1.03723729,
+0.302644640,
+0.880255878
416+0.531118751,
+0.00000000,
+0.453695059,
+0.543955266,
+0.402912736,
+0.369405657
417+0.648618877,
+0.453695059,
+0.00000000,
+0.559946954,
+0.647735000,
+0.531468928
418+1.03723729,
+0.543955266,
+0.559946954,
+0.00000000,
+0.913280845,
+0.242705643
419+0.302644640,
+0.402912736,
+0.647735000,
+0.913280845,
+0.00000000,
+0.709048092
420+0.880255878,
+0.369405657,
+0.531468928,
+0.242705643,
+0.709048092,
+0.00000000
424+0.00000000,
+0.531118751,
+0.648618877,
+1.03723729,
+0.302644640,
+0.880255878
425+0.531118751,
+0.00000000,
+0.453695059,
+0.543955266,
+0.402912736,
+0.369405657
426+0.648618877,
+0.453695059,
+0.00000000,
+0.559946954,
+0.647735000,
+0.531468928
427+1.03723729,
+0.543955266,
+0.559946954,
+0.00000000,
+0.913280845,
+0.242705643
428+0.302644640,
+0.402912736,
+0.647735000,
+0.913280845,
+0.00000000,
+0.709048092
429+0.880255878,
+0.369405657,
+0.531468928,
+0.242705643,
+0.709048092,
+0.00000000
431+1,
+2,
+3,
+4,
+5,
+6
432+5,
+6,
+2,
+6,
+1,
+4
433+2,
+5,
+6,
+2,
+2,
+2
434+3,
+3,
+4,
+3,
+3,
+3
435+6,
+1,
+5,
+5,
+6,
+5
436+4,
+4,
+1,
+1,
+4,
+1
440+0.531118751,
+0.531118751,
+0.648618877,
+1.03723729,
+0.302644640,
+0.880255878
441+0.648618877,
+0.453695059,
+0.453695059,
+0.543955266,
+0.402912736,
+0.369405657
442+1.03723729,
+0.543955266,
+0.559946954,
+0.559946954,
+0.647735000,
+0.531468928
443+0.302644640,
+0.402912736,
+0.647735000,
+0.913280845,
+0.913280845,
+0.242705643
444+0.880255878,
+0.369405657,
+0.531468928,
+0.242705643,
+0.709048092,
+0.709048092
447+0.302644640,
+0.369405657,
+0.453695059,
+0.242705643,
+0.302644640,
+0.242705643
448+0.531118751,
+0.402912736,
+0.531468928,
+0.543955266,
+0.402912736,
+0.369405657
449+0.648618877,
+0.453695059,
+0.559946954,
+0.559946954,
+0.647735000,
+0.531468928
450+0.880255878,
+0.531118751,
+0.647735000,
+0.913280845,
+0.913280845,
+0.709048092
451+1.03723729,
+0.543955266,
+0.648618877,
+1.03723729,
+0.709048092,
+0.880255878
454+0.531118751,
+0.531118751,
+0.648618877,
+1.03723729,
+0.302644640,
+0.880255878
455+0.648618877,
+0.453695059,
+0.453695059,
+0.543955266,
+0.402912736,
+0.369405657
456+1.03723729,
+0.543955266,
+0.559946954,
+0.559946954,
+0.647735000,
+0.531468928
457+0.302644640,
+0.402912736,
+0.647735000,
+0.913280845,
+0.913280845,
+0.242705643
458+0.880255878,
+0.369405657,
+0.531468928,
+0.242705643,
+0.709048092,
+0.709048092
462+0.531118751,
+0.531118751,
+0.648618877,
+1.03723729,
+0.302644640,
+0.880255878
463+0.648618877,
+0.453695059,
+0.453695059,
+0.543955266,
+0.402912736,
+0.369405657
464+1.03723729,
+0.543955266,
+0.559946954,
+0.559946954,
+0.647735000,
+0.531468928
465+0.302644640,
+0.402912736,
+0.647735000,
+0.913280845,
+0.913280845,
+0.242705643
466+0.880255878,
+0.369405657,
+0.531468928,
+0.242705643,
+0.709048092,
+0.709048092
468+4,
+5,
+2,
+5,
+1,
+4
469+1,
+4,
+5,
+2,
+2,
+2
470+2,
+2,
+3,
+3,
+3,
+3
471+5,
+1,
+4,
+4,
+5,
+5
472+3,
+3,
+1,
+1,
+4,
+1
- 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.
-
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.
-
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.
- Copyright
- Computational Data Science Lab
- 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.