The MakeDirected command returns a directed graph with vertices from G. For each edge in G, the arcs in both directions are in the new graph. If G is a weighted graph, then a matrix M may be included as part of the input; in such a case the arc weights are taken from the entries of M.
G ≔ MakeDirected⁡CycleGraph⁡4:
G ≔ MakeWeighted⁡CycleGraph⁡4:
M ≔ Matrix⁡0,0,0,1,2,0,1,3,0,1,0,4,5,0,4,0:
G ≔ MakeDirected⁡G,M:
Download Help Document
What kind of issue would you like to report? (Optional)