Skip to content

Commit ad51d7f

Browse files
docs: add comprehensive graph documentation with examples
Add GRAPH_GUIDE.md with detailed explanations of how to use this library with traditional graph structures (nodes, edges, weights). The guide covers: - Core concept of successor functions for weighted and unweighted graphs - Five graph representation examples (adjacency list, adjacency matrix, edge list, struct-based, and unweighted graphs) - Usage examples for Dijkstra, A*, and BFS algorithms - Practical spatial shortest paths example - Guidance on converting from R/Python graph libraries - Tips, best practices, and common patterns Add four working example files demonstrating different approaches: - graph-adjacency-list.rs: Dijkstra with adjacency list - graph-adjacency-matrix.rs: A* with adjacency matrix - graph-struct.rs: Encapsulated graph logic in a struct - graph-unweighted-bfs.rs: BFS with unweighted graph Add comprehensive test suite (tests/graph_guide_examples.rs) with 6 tests covering all self-contained examples in the documentation to ensure they compile and produce expected results. Update README.md to link to the new graph guide. Update Cargo.toml to include GRAPH_GUIDE.md in package distribution so it appears in generated documentation. Fix pre-existing clippy error in sliding-puzzle example by deriving PartialEq and Eq instead of manual implementation. Fixes #675 Co-authored-by: samueltardieu <44656+samueltardieu@users.noreply.github.com>
1 parent c6965e0 commit ad51d7f

File tree

10 files changed

+1363
-12
lines changed

10 files changed

+1363
-12
lines changed

Cargo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ categories = ["algorithms"]
1212
readme = "README.md"
1313
edition = "2024"
1414
rust-version = "1.86.0"
15+
include = [
16+
"src/**/*",
17+
"tests/**/*",
18+
"benches/**/*",
19+
"examples/**/*",
20+
"Cargo.toml",
21+
"README.md",
22+
"GRAPH_GUIDE.md",
23+
"CHANGELOG.md",
24+
"LICENSE-APACHE",
25+
"LICENSE-MIT",
26+
]
1527

1628
[package.metadata.release]
1729
sign-commit = true

0 commit comments

Comments
 (0)