@@ -21,12 +21,12 @@ for points in the `(m,n)`-matrix `X` given the `NN` object.
21
21
function knn (NN:: AbstractNearestNeighbors , X:: AbstractVecOrMat{T} , k:: Integer ; kwargs... ) where T<: Real end
22
22
23
23
"""
24
- inradius (NN::AbstractNearestNeighbors, X::AbstractVecOrMat{T}, r::Real; kwargs...) -> (I,D)
24
+ inrange (NN::AbstractNearestNeighbors, X::AbstractVecOrMat{T}, r::Real; kwargs...) -> (I,D)
25
25
26
26
Returns collections of point indexes and distances in radius `r` of points in
27
27
the `(m,n)`-matrix `X` given the `NN` object.
28
28
"""
29
- function inradius (NN:: AbstractNearestNeighbors , X:: AbstractVecOrMat{T} , r:: Real ; kwargs... ) where T<: Real end
29
+ function inrange (NN:: AbstractNearestNeighbors , X:: AbstractVecOrMat{T} , r:: Real ; kwargs... ) where T<: Real end
30
30
31
31
"""
32
32
adjacency_list(NN::AbstractNearestNeighbors, X::AbstractVecOrMat{T}, k::Real; kwargs...) -> (A, W)
@@ -44,7 +44,7 @@ function adjacency_list(NN::AbstractNearestNeighbors, X::AbstractVecOrMat{T},
44
44
end
45
45
function adjacency_list (NN:: AbstractNearestNeighbors , X:: AbstractVecOrMat{T} ,
46
46
k:: Real ; weights:: Bool = false , kwargs... ) where T<: Real
47
- A, W = inradius (NN, X, k; weights= weights, kwargs... )
47
+ A, W = inrange (NN, X, k; weights= weights, kwargs... )
48
48
return A, W
49
49
end
50
50
@@ -70,7 +70,7 @@ function adjacency_matrix(NN::AbstractNearestNeighbors, X::AbstractVecOrMat{T},
70
70
n = size (NN)[2 ]
71
71
m = length (eachcol (X))
72
72
@assert n >= m " Cannot construc matrix for more then $n fitted points"
73
- E, W = inradius (NN, X, r; weights= true , kwargs... )
73
+ E, W = inrange (NN, X, r; weights= true , kwargs... )
74
74
return sparse (E, W, n, symmetric= symmetric)
75
75
end
76
76
@@ -111,7 +111,7 @@ function knn(NN::BruteForce{T}, X::AbstractVecOrMat{T}, k::Integer;
111
111
return A, W
112
112
end
113
113
114
- function inradius (NN:: BruteForce{T} , X:: AbstractVecOrMat{T} , r:: Real ;
114
+ function inrange (NN:: BruteForce{T} , X:: AbstractVecOrMat{T} , r:: Real ;
115
115
self:: Bool = false , weights:: Bool = false , kwargs... ) where T<: Real
116
116
# construct distance matrix
117
117
D = pairwise ((x,y)-> norm (x- y), eachcol (NN. fitted), eachcol (X))
0 commit comments