The answer must be obvious, but I can't come up with it. In the previous versions of Mathematica there was ListGraphs
function from Combinatorica package which was able to take number of vertices and edges as arguments. The help page states that beggining from 10.0 version its functionality was implemented in built-in GraphData
. When I tried to run GraphData[4,3]
it returned me an error
GraphData::notdef: GraphData has no value associated with the specified argument(s).
What should I do now if I need a list of all non-isomorphic graphs with $n$ vertices and $m$ edges?
Select[GraphData[3], GraphData[#, "EdgeCount"] == 2 &]
works but is extremely slow $\endgroup$GraphData[n]
(which gives gives a list of named graphs with n vertices) is supported. Perhaps you can use something likeSelect[GraphData[4], GraphData[#, "EdgeCount"] == 3&]
? $\endgroup$