Skip to main content

init_investment_graph

Function init_investment_graph 

Source
fn init_investment_graph(
    graph: &CommoditiesGraph,
    commodities: &CommodityMap,
) -> Graph<MarketSet, GraphEdge, Directed>
Expand description

Initialise an InvestmentGraph from a CommoditiesGraph.

The commodity graph is filtered to only include SVD/SED commodity nodes. Each commodity node (carrying both CommodityID and RegionID) is added to the investment graph as a MarketSet::Single, with edges preserved.