zero or or more options as specified below
Specifies whether weights should be included in the output. If true, each element of the resulting set is a list whose first element is the edge, and whose second element is the edge weight. The default value is false.
The Edges(G,opts) function returns a set of the edges of G.
The Vertices(G) function returns a list of the vertex labels of G.
To count vertices and edges, use the NumberOfEdges or NumberOfVertices commands.
G ≔ Graph⁡1,2,3,4,1,2,1,3,1,4
G≔Graph 1: an undirected unweighted graph with 4 vertices and 3 edge(s)
G ≔ Graph⁡a,b,c,a,b,b,c,c,a
G≔Graph 2: a directed unweighted graph with 3 vertices and 3 arc(s)
A ≔ Matrix⁡0,1,1,1,0,1,1,1,0:
G ≔ Graph⁡A
G≔Graph 3: an undirected unweighted graph with 3 vertices and 3 edge(s)
A ≔ Matrix⁡0.0,0.5,0.0,0.0,0.0,1.0,1.5,0.0,0.0:
G≔Graph 4: a directed weighted graph with 3 vertices and 3 arc(s)
Download Help Document
What kind of issue would you like to report? (Optional)