This directory contains a standalone C++ experimental line for BAG-style range and kNN queries on road networks.
The code in this directory focuses on:
- loading
.grroad-network files - importing external METIS-style partition assignments
- building the corresponding skeleton index
- running range and kNN query smoke tests / batch runs
Use CMake with a Release build:
cmake -S . -B build-metis -DCMAKE_BUILD_TYPE=Release
cmake --build build-metis --config ReleaseThe executable will be generated at:
build-metis\Release\bag_cpp.exeThis runs the built-in METIS-based default experiment with fixed internal settings and no query-point arguments:
build-metis\Release\bag_cpp.exe defaultThe default profile currently uses an internal NY graph / assignment / query configuration baked into the executable.
This command imports a pre-generated METIS assignment and prints partition / skeleton statistics:
build-metis\Release\bag_cpp.exe partition `
--path <graph.gr> `
--metis-assignment <assignment.csv> `
--theta <theta>This command builds the index once and runs both range and kNN on one query point:
build-metis\Release\bag_cpp.exe probe `
--path <graph.gr> `
--metis-assignment <assignment.csv> `
--theta <theta> `
--query-u <u> `
--query-v <v> `
--offset <offset> `
--objects <object_count> `
--object-seed <seed> `
--range-radius <radius> `
--knn-k <k> `
--repeat <times> `
--fc-rule <rule>This command builds the index once, then runs a batch of random range and kNN queries:
build-metis\Release\bag_cpp.exe batch `
--path <graph.gr> `
--metis-assignment <assignment.csv> `
--theta <theta> `
--query-count <count> `
--query-seed <seed> `
--objects <object_count> `
--object-seed <seed> `
--range-radius <radius> `
--knn-k <k> `
--fc-rule <rule>Typical inputs are:
- graph: a DIMACS-style
.grroad-network file - assignment: a CSV file that provides one partition id per vertex
src/main.cpp: CLI entrysrc/metis_partition.*: METIS assignment import and partition reconstructionsrc/index.*: skeleton index build and query processingsrc/object.*: moving-object generation and storagesrc/distance.*: shortest-path utilities
- This directory is an experiment line and is intended for code study and reproducible local runs.
- Build artifacts under
build/andbuild-metis/are ignored by git.