Skip to content

wbprice/food-dependency-graph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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