Skip to content

Conversation

dcodrut
Copy link

@dcodrut dcodrut commented Aug 22, 2025

This PR fixes #801:

  • Fix the Toussaint RNG-2 condition: prune $(i,j)$ if ∃ $k$: $\max(d_{ik}, d_{jk}) < d_{ij}$
  • include last node: n = len(coordinates) and skip k == i or k == j
  • Updated the test (the resulted graph in shown below)
image

@dcodrut dcodrut changed the title BUG: RNG pruning condition and loop bound #801 BUG: RNG pruning condition and loop bound Aug 22, 2025
Copy link

codecov bot commented Aug 22, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.4%. Comparing base (44ede54) to head (f134a92).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##            main    #802   +/-   ##
=====================================
  Coverage   85.4%   85.4%           
=====================================
  Files        150     150           
  Lines      15971   15951   -20     
=====================================
- Hits       13632   13618   -14     
+ Misses      2339    2333    -6     
Files with missing lines Coverage Δ
libpysal/weights/gabriel.py 91.2% <100.0%> (+0.1%) ⬆️
libpysal/weights/tests/test_gabriel.py 100.0% <100.0%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jGaboardi jGaboardi requested a review from ljwolf August 22, 2025 12:19
Copy link
Member

@jGaboardi jGaboardi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch on the @dcodrut ! Thanks for the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in the Delaunay prunning (RNG-2)
2 participants