Hublabel#239
Conversation
…it returns, and which is a different size on mac
…rs that validate it
…opefully query off the right orientations
…ses that all can run
…rtices from a net graph child. Add a bunch of comments exlaining why I am confused by the distance index orientation bookkeeping.
…ord access attempts
…t that instead of unpicking it
…divine the correct way to use them
…ances Add O(1) get_snarl_child_count() that reads the stored count directly. Replace Dijkstra fallback for oversized snarl internal distances with hub label (HHL) queries. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
# Conflicts: # bdsg/include/bdsg/snarl_distance_index.hpp
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The merge of origin/hublabel-debug introduced duplicate declarations in the header (lines 439 and 550) and duplicate definitions in the .cpp (lines 631 and 648). Removed the older versions, keeping the ones from hublabel-debug which have better comments and slightly cleaner impl. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
adamnovak
left a comment
There was a problem hiding this comment.
It looks like this brings along more of the other oracle approaches than we need to to implement just the contraction hierarchies and hierarchical hub labeling that actually gets used.
There's also some commented-out code that should be removed, and some documentation comments that ought to be written, some of which are for things I added.
Also, I didn't add a file comment for it, but if it's easy I might port away from Boost to our own data structure for what's now called the "Boost graph", to avoid the dependency. Right now we have Boost in vg only because of the old Vowpal-Wabbit MAPQ recalibration stuff in vgteam/vg#1621 which I don't know actually has any users. If it's not easy it probably wouldn't be worth doing, or at least might not be worth doing now. (Since it's only needed for the construction, we can change later if we want to without invalidating indexes.)
| // need to debug | ||
| for (size_t a = 0; a < handles.size() * 2; a++) { | ||
| cerr << hhl_query(packed_labels.begin(), rank(1, false), a) << endl; | ||
| } |
There was a problem hiding this comment.
This has been debugged now, right? We should probably not print stuff from the tests unless they're built with a define.
| @@ -5089,6 +5393,7 @@ int main(void) { | |||
| test_packed_subgraph_overlay(); | |||
| test_multithreaded_overlay_construction(); | |||
| test_mapped_packed_graph(); | |||
| test_hash_graph(); | |||
| test_snarl_distance_index(); | |||
| test_hash_graph(); */ | |||
| test_hub_labeling(); | |||
| //test_snarl_distance_index(); | |||
There was a problem hiding this comment.
We have to turn the other tests back on.
|
|
||
| // We limit threading on small inputs. | ||
| auto limited_threads = [&](size_t batch) { | ||
| return std::max<size_t>(1, std::min<size_t>(batch / 1024, get_thread_count())); |
There was a problem hiding this comment.
I think I added this, but this could use a constant instead of a magic number.
| # Find other system dependencies | ||
| pkg_check_modules(Jansson REQUIRED IMPORTED_TARGET jansson) | ||
|
|
||
| find_package(Boost REQUIRED) |
There was a problem hiding this comment.
If we're adding a dependency on Boost, we need to explain that in the README.
| OBJS += $(OBJ_DIR)/subgraph_overlay.o | ||
| OBJS += $(OBJ_DIR)/vectorizable_overlays.o | ||
| OBJS += $(OBJ_DIR)/packed_subgraph_overlay.o | ||
| OBJS += $(OBJ_DIR)/ch.o |
There was a problem hiding this comment.
So we don't actually need hublabel.o and landmark.o and we can drop their CPP files?
planned by Claude Opus 4.7
planned by Claude Opus 4.7
planned by Claude Opus 4.7
planned by Claude Opus 4.7
fix typos Co-authored-by: Adam Novak <anovak@soe.ucsc.edu>
Co-authored-by: Adam Novak <anovak@soe.ucsc.edu>
Co-authored-by: Adam Novak <anovak@soe.ucsc.edu>
Co-authored-by: Adam Novak <anovak@soe.ucsc.edu>
libbdsg changes to go with merging the hublabel branch of vg