Skip to content

Spatial tree interface #297

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 30 commits into from
Apr 20, 2025
Merged

Spatial tree interface #297

merged 30 commits into from
Apr 20, 2025

Conversation

asinghvi17
Copy link
Member

@asinghvi17 asinghvi17 commented Apr 17, 2025

Spatial Trees

This PR performs all the necessary actions to add a spatial tree interface and surrounding machinery to GeometryOps. Actually accelerating GeometryOps functions with the spatial trees is left for another PR - we don't tackle that in this one.

This implements, at a high level, functional, non-allocating single-tree and dual tree queries over arbitrary predicates.

SpatialTreeInterface

Introduces a new SpatialTreeInterface module that provides an interface for spatial trees, built somewhat on top of AbstractTrees.jl.

LoopStateMachine

Introduces a new LoopStateMachine module that provides utilities for returning state from functions running inside loops. This is particularly useful for operations like clipping where state transitions or early termination may be needed.

The module includes:

  • Action struct for representing different control flow actions
  • @controlflow macro for processing actions within loops
  • Support for :continue, :break, :return, and :full_return actions

Comprehensive tests verify all supported actions work correctly.

@asinghvi17 asinghvi17 changed the title Move utils to utils/utils.jl and add edge list functionality Spatial tree interface Apr 17, 2025
@asinghvi17 asinghvi17 marked this pull request as ready for review April 17, 2025 02:41
Copy link
Member

@rafaqz rafaqz left a comment

Choose a reason for hiding this comment

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

This looks great, these are maybe a bit perfectionist comments but some of these things are quite hard to understand so its worth working over the naming and docstings a little

@asinghvi17 asinghvi17 changed the base branch from as/adaptivepredicates to graphite-base/297 April 20, 2025 00:28
@asinghvi17 asinghvi17 force-pushed the as/spatialtreeinterface branch from bfd57aa to d5a49de Compare April 20, 2025 00:28
@asinghvi17 asinghvi17 changed the base branch from graphite-base/297 to main April 20, 2025 00:28
@asinghvi17 asinghvi17 merged commit dca151b into main Apr 20, 2025
8 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