Add longest-shortest-path command
This commit is contained in:
parent
1265dd4a41
commit
60ba7721db
3 changed files with 178 additions and 0 deletions
|
|
@ -23,6 +23,10 @@ enum Command {
|
|||
#[clap(short, long)]
|
||||
flip: bool,
|
||||
},
|
||||
/// Find the longest shortest path starting at an article.
|
||||
LongestShortestPath {
|
||||
from: String,
|
||||
},
|
||||
// Print all page titles.
|
||||
ListPages,
|
||||
}
|
||||
|
|
@ -46,6 +50,9 @@ fn main() -> io::Result<()> {
|
|||
commands::path::path(&args.datafile, &from, &to)
|
||||
}
|
||||
}
|
||||
Command::LongestShortestPath { from } => {
|
||||
commands::longest_shortest_path::run(&args.datafile, &from)
|
||||
}
|
||||
Command::ListPages => commands::list_pages::run(&args.datafile),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue