Ask Your Question

Revision history [back]

You can use graphs.nauty_geng, for example, if you want to iterate over all connected graphs of length 7, you can do:

  sage: gen = graphs.nauty_geng("7 -c")
  sage: for g in gen:
  ....:     do some stuff with g

See graphs.nauty_geng? for more details.