Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages