Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

Zepeacedust
Copy link
Contributor

@Zepeacedust Zepeacedust commented Aug 17, 2025

  • By submitting this pull request, I assign the copyright of my contribution to The igraph development team.

Working off from #2806 this will implement Beta-skeletons.

Functions to be implemented:
Lune and circle based beta skeletons, beta-weighted gabriel graph.

Ref: #2828

TODO

  • Gabriel graph function
  • Relative Neighborhood Graph function, using open exclusion region
  • Review code readability, add comments where necessary, use typedefs as appropriate
  • Ensure that code is cleanly formatted (use of empty lines, indentation, etc), follows conventions, no extra headers present, etc.
  • Mark comments resolved when appropriate

@Zepeacedust
Copy link
Contributor Author

Zepeacedust commented Aug 17, 2025

I really should have rebased this, but since you squash commits I think it will be ok.
Do let me know if you prefer a rebase.

@Zepeacedust Zepeacedust reopened this Aug 17, 2025
@szhorvat
Copy link
Member

Yes, please rebase on develop.

Copy link

codecov bot commented Aug 18, 2025

Codecov Report

❌ Patch coverage is 97.49216% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.51%. Comparing base (e2f9682) to head (1890bf9).
⚠️ Report is 72 commits behind head on develop.

Files with missing lines Patch % Lines
src/spatial/beta_skeleton.cpp 97.44% 7 Missing ⚠️
src/spatial/nanoflann_internal.hpp 97.77% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2827      +/-   ##
===========================================
+ Coverage    75.37%   75.51%   +0.14%     
===========================================
  Files          404      406       +2     
  Lines        75323    75655     +332     
  Branches     14974    15023      +49     
===========================================
+ Hits         56771    57131     +360     
+ Misses       18552    18524      -28     
Files with missing lines Coverage Δ
src/spatial/nearest_neighbor.cpp 87.50% <ø> (-4.26%) ⬇️
src/spatial/nanoflann_internal.hpp 97.77% <97.77%> (ø)
src/spatial/beta_skeleton.cpp 97.44% <97.44%> (ø)

... and 12 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e2f9682...1890bf9. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@szhorvat szhorvat requested a review from Copilot August 30, 2025 23:22
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request implements beta skeletons, which are spatial graph construction algorithms for creating proximity graphs from point sets. The implementation includes lune-based and circle-based beta skeleton algorithms, along with related functions for Gabriel graphs and relative neighborhood graphs.

Key changes include:

  • Implementation of lune and circle-based beta skeleton algorithms with configurable beta parameters
  • Addition of Gabriel graph and relative neighborhood graph functions as special cases
  • Creation of a beta-weighted Gabriel graph function that provides edge weights representing beta threshold values

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/spatial/beta_skeleton.cpp Core implementation of beta skeleton algorithms and related graph construction functions
src/spatial/nanoflann_internal.hpp Shared utilities for spatial data structures, extracted from nearest neighbor implementation
src/spatial/nearest_neighbor.cpp Refactored to use shared nanoflann utilities
include/igraph_spatial.h Public API declarations for new beta skeleton functions
tests/unit/beta_skeletons.c Comprehensive unit tests covering various beta values and edge cases
tests/benchmarks/beta_skeletons.c Performance benchmarks for the new algorithms
tests/CMakeLists.txt Build configuration updates for new test files
src/CMakeLists.txt Build configuration for new source file
doc/spatial.xxml Documentation integration for new functions

@szhorvat
Copy link
Member

@Zepeacedust Can you think through the time complexities of these, based on the complexity indicated for the Delaunay function, k-D tree search complexity, and the code here?

@szhorvat
Copy link
Member

@Zepeacedust There was a major renaming from igraph_integer_t -> igraph_int_t. I took care of adapting this PR. Make sure you pull before you do anything else.

@szhorvat
Copy link
Member

szhorvat commented Sep 2, 2025

@Zepeacedust Can you please remove spaces from around < and > when used in templates? I see some of the ones I removed got the spaces back. This is subjective, but we prefer no spaces for readability and no confusion with less-than / greater-than.

@Zepeacedust Zepeacedust marked this pull request as ready for review September 8, 2025 16:02
@szhorvat
Copy link
Member

szhorvat commented Sep 8, 2025

@ntamas Okay to merge this? I'll get additional polish later.

EDIT: Just let me know and I'll merge.

@szhorvat szhorvat requested a review from ntamas September 14, 2025 20:31
@szhorvat
Copy link
Member

@ntamas OK to merge this? It's been ready for a while. We're hoping to expose it in Python soon.

@szhorvat szhorvat merged commit 3608722 into igraph:develop Sep 16, 2025
27 checks passed
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.

2 participants