Skip to main content

webgraph_cli/analyze/
mod.rs

1/*
2 * SPDX-FileCopyrightText: 2024 Tommaso Fontana
3 * SPDX-FileCopyrightText: 2026 Sebastiano Vigna
4 *
5 * SPDX-License-Identifier: Apache-2.0 OR MIT
6 */
7
8use anyhow::Result;
9use clap::Subcommand;
10
11pub mod codes;
12pub mod stats;
13
14/// Computes statistics on graphs.​
15#[derive(Subcommand, Debug)]
16#[command(name = "analyze")]
17pub enum SubCommands {
18    Codes(codes::CliArgs),
19    Stats(stats::CliArgs),
20}
21
22pub fn main(subcommand: SubCommands) -> Result<()> {
23    match subcommand {
24        SubCommands::Codes(args) => codes::main(args),
25        SubCommands::Stats(args) => stats::main(args),
26    }
27}