Open isacdaavid opened 2 years ago
Although lazy evaluation is unsupported, you can generate fewer cycles by adding some constraints. For example, if you only want to enumerate cycles including paths (1,2,3,4), do as follows.
path = GraphSet({}).including([(1,2), (2,3), (3,4)])
GraphSet.cycles(is_hamilton=True, graphset=path)
Hi,
I am trying to find Hamiltonian cycles in homogeneous grids of certain number of nodes and limited node degree. I can perform the full computation for a universe/grid up to 4x4 size, but if I go to a 5x5 grid graph, then calling:
...overflows my 500 GB of RAM without finishing, in a matter of a few minutes.
I don't need the whole set of cycles. Is there a way to get something like a regular Python generator, so that I can consume results lazily? Or a parameter to limit the number of results that are computed eagerly before returning?
Thanks in advance