Phase 5: native KDEEB hammer, drop Python dependency - #23
Merged
Merged
Conversation
Reimplement edge_bundle_hammer() in C++ (src/kdeeb.cpp) as kernel density estimation edge bundling (Hurter, Ersoy & Telea 2012): sample edges into points, estimate a density field on a grid, advect points up the density gradient, smooth and resample, shrinking the bandwidth each iteration. This removes the reticulate/datashader dependency entirely: reticulate is dropped from Imports, and the .onLoad Python config, shader_env, and install_bundle_py() are removed. Bundling output differs from the old datashader-backed version. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Sixth phase (see
_docs/REFACTORING-PLAN.md). The headline dependency reduction.What
src/kdeeb.cpp(kdeeb_iter): native kernel density estimation edge bundling (Hurter, Ersoy & Telea 2012) — the algorithm behind datashader's "hammer". Density grid → separable Gaussian blur → gradient advection → smoothing → arc-length resample, with the bandwidth decaying each iteration.edge_bundle_hammer()rewritten to call it. Samebw/decayparams plus tuning knobs (npoints,iterations,grid,step,smooth).reticulateremoved fromImports; the.onLoadPython config,shader_env, andinstall_bundle_py()are deleted.edgebundlenow has no Python dependency.Tests
Contract (
x,y,index,group, 50 pts/edge), finiteness, endpoints fixed, and locality: nearby parallel edges bundle (spread 3 → ~0.01) while a distant edge stays separate.FAIL 0 | PASS 71.Notes
mark_edge_bundle(type="hammer")— worth coordinating on the N13 side.🤖 Generated with Claude Code