WLJS LogoWLJS Notebook

DirectedGraph

DirectedGraph[g] gives a directed graph from the undirected graph g.

DirectedGraph[g, conv] gives a directed graph using the conversion conv.

Examples

Convert undirected to directed:

DirectedGraph[Graph[{1 <-> 2, 2 <-> 3}]]

With specific conversion:

DirectedGraph[CycleGraph[4], "Acyclic"]

Please visit the official Wolfram Language Reference for more details.

On this page