Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-cluster
Commits
0841c7c3
Commit
0841c7c3
authored
Aug 05, 2020
by
rusty1s
Browse files
fixed a bug in which max_num_neighbors was not handled correctly
parent
99d0792e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
csrc/cpu/radius_cpu.cpp
csrc/cpu/radius_cpu.cpp
+2
-1
No files found.
csrc/cpu/radius_cpu.cpp
View file @
0841c7c3
...
@@ -88,7 +88,8 @@ torch::Tensor radius_cpu(torch::Tensor x, torch::Tensor y,
...
@@ -88,7 +88,8 @@ torch::Tensor radius_cpu(torch::Tensor x, torch::Tensor y,
size_t
num_matches
=
mat_index
.
index
->
radiusSearch
(
size_t
num_matches
=
mat_index
.
index
->
radiusSearch
(
y_data
+
i
*
y
.
size
(
1
),
r
*
r
+
0.00001
,
ret_matches
,
params
);
y_data
+
i
*
y
.
size
(
1
),
r
*
r
+
0.00001
,
ret_matches
,
params
);
for
(
size_t
j
=
0
;
j
<
num_matches
;
j
++
)
{
for
(
size_t
j
=
0
;
j
<
std
::
min
(
num_matches
,
(
size_t
)
max_num_neighbors
);
j
++
)
{
out_vec
.
push_back
(
x_start
+
ret_matches
[
j
].
first
);
out_vec
.
push_back
(
x_start
+
ret_matches
[
j
].
first
);
out_vec
.
push_back
(
i
);
out_vec
.
push_back
(
i
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment