Skip to content
No description, website, or topics provided.
Rust
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
Cargo.lock
Cargo.toml
README.md

README.md

food-dependency-graph

Sketch describing how to use petgraph to model relationships between foods and ingredients with a directed graph.

petgraph is used to create a graph:

digraph {
    0 [label="Actions(CookIngredient)"]
    1 [label="Ingredients(HotDogBun)"]
    2 [label="Ingredients(HotDogLink)"]
    3 [label="Ingredients(HotDogLinkCooked)"]
    4 [label="Dishes(HotDog)"]
    0 -> 3
    2 -> 3
    3 -> 4
    1 -> 4
}

Which can be rendered as:

food-dependency-graph

Usage

// Install Rust if you don't have it: https://www.rust-lang.org/tools/install
git clone git@github.com:wbprice/food-dependency-graph.git && cd food-dependency-graph
cargo run
You can’t perform that action at this time.