mirror of
https://github.com/instant-labs/instant-distance.git
synced 2025-02-09 01:12:03 +00:00
Fix formatting
This commit is contained in:
parent
c03cec4458
commit
08e1f4e085
@ -489,7 +489,13 @@ trait Layer {
|
|||||||
/// M * 2 links per node), but for performance reasons we often call this function on the data
|
/// M * 2 links per node), but for performance reasons we often call this function on the data
|
||||||
/// representation matching the zero layer even when we're referring to a higher layer. In that
|
/// representation matching the zero layer even when we're referring to a higher layer. In that
|
||||||
/// case, we use `links` to constrain the number of per-candidate links we consider for search.
|
/// case, we use `links` to constrain the number of per-candidate links we consider for search.
|
||||||
fn search<P: Point>(&self, point: &P, search: &mut Search, points: &[P], links: usize) {
|
fn search<P: Point>(
|
||||||
|
&self,
|
||||||
|
point: &P,
|
||||||
|
search: &mut Search,
|
||||||
|
points: &[P],
|
||||||
|
links: usize,
|
||||||
|
) {
|
||||||
while let Some(Reverse(candidate)) = search.candidates.pop() {
|
while let Some(Reverse(candidate)) = search.candidates.pop() {
|
||||||
if let Some(furthest) = search.nearest.last() {
|
if let Some(furthest) = search.nearest.last() {
|
||||||
if candidate.distance > furthest.distance {
|
if candidate.distance > furthest.distance {
|
||||||
|
Loading…
Reference in New Issue
Block a user