How tlancian/dith works
File structure
• Top level
• datasets/ – input graphs and their precomputed proximity/distance tables
• sw/ – the software package (source and compiled binaries)
• output/ – where result TSV files are written
• sw/src/algorithms/ – the core class SuperGreedyPP.java implementing the DITH algorithm
• sw/src/tools/ – supporting data structures (e.g., FastAndSimpleIndexMinPQ.java)
• sw/bin/algorithms/ and sw/bin/tools/ mirror the compiled .class files (ready to run)
Extract insights from the README
• The entry point is java -Xms4g -Xmx4g algorithms.SuperGreedyPP ...
• Positional arguments feed:
• path to dataset folder
• graph file (tsv)
• sets A and R (attractors/repulsers)
• λ₁, λ₂ coefficients
• proximity/distance files
• iteration cap T and approximation γ
• output folder + experiment ID
Main components to reflect
a. Data Sources
• Graph files (datasets/*/*.tsv)
• Precomputed proximity & distance tables
b. Compute Module
• JVM runtime loading sw/bin/algorithms/SuperGreedyPP
• Algorithms package (SuperGreedyPP.java)
• Tools package (FastAndSimpleIndexMinPQ.java, etc.)
c. CLI Interface
• Shell/Terminal invoking java … with parameters
d. Output Sink
• Result TSV in output_data_directory
Relationships and data flow
• CLI → JVM (启动 Java process)
• JVM reads Graph TSV + proximity/distance TSV from datasets
• JVM instantiates data structures via code in tools/
• SuperGreedyPP runs iterative greedy loops (uses FastAndSimpleIndexMinPQ)
• Computation writes summary TSV to output/
Architectural patterns & design principles
• Modular separation:
• algorithms module for core logic
• tools module for reusable data structures
• Single process, batch-oriented pipeline
• Explicit parameterization for reproducibility (all inputs passed as args)