Returns the number of edges.
MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
Graph::getEdgeNumber(G) returns a number
representing the number of edges in
Let us create a graph and find out the number of edges:
G1 := Graph([1, a, 3, 4], [[1, a], [1, 3], [1, 4]]): Graph::getEdgeNumber(G1)
We know that a complete graph consists of |Vertices|2 - |Vertices| edges:
G2 := Graph::createCompleteGraph(4): Graph::getEdgeNumber(G2)