Is it possible to make (Weighted
)AdjacencyMatrix
from a graph whose elements have custom properties?
Consider this graph:
g = Graph[{
Property[DirectedEdge[0, 1], {"WaterFlow" -> x, "PipeWidth" -> 10.0}],
Property[DirectedEdge[1, 2], {"WaterFlow" -> x + y, "PipeWidth" -> 8.5}],
Property[DirectedEdge[2, 1], {"WaterFlow" -> y, "PipeWidth" -> 8.5}],
Property[DirectedEdge[2, 3], {"WaterFlow" -> x, "PipeWidth" -> 10.0}]
}]
How do I make one WeightedAdjacencyMatrix
weighted by "WaterFlow"
and another one weighted by "PipeWidth"
?
For example, the one for "WaterFlow"
would be: