[][src]Module product_graph_rs::product_graph_rayon

Structs

Dependency

The Dependency struct contains an index for a dependency in the array-backed graph, and the quantity that is depended on.

GraphError
Product

The Product struct represents the non-computable data for a product in real life. For example, a cup of lemonade could have a direct cost of $0.1 in wages, or 0.01 in labor hours, and could depend on 0.8 cups of water, 0.1 cup lemon juice, and 0.1 cup of sugar. However, the total cost of the lemonade is unknown at this point, as the indirect costs of all the products in the graph depend on each other, cyclically and acyclically. The Product struct is intended to be used as part of the ProductGraph to calculate the unknown indirect costs.

ProductGraph

The ProductGraph is a Vector-backed graph of Products. The Products are the graph nodes, and the dependencies are weighted, directed edges. The "key" or "id" of each Product is its index in the Vector. This graph is specialized for the purpose of rapidly estimating indirect costs.