Message Boards Message Boards


Show interim results after abort computation / Pause compution

Posted 9 years ago
1 Reply
0 Total Likes


I want to Find all cycles in a graph. I have approx. more than 50 vertices and 3000 edges so the computation needs a lot of time. I have two questions. Since I have to travel a lot I'd like to pause the computation and start it later from the point where I left (if possible).
If that's not possible I would also be happy if I could get the results until I abort/Interrupt the computation at some point. The code line looks like this:

FindCycle[RandomGraph[{50, 1000}, DirectedEdges -> True], Infinity, All] 

best regards

POSTED BY: Peanut Butter

Hello I can't see any way to get intermediate results out of FindCycle, but you could build this up by computing cycles of given lengths and saving intermediate results. For example:

rg = RandomGraph[{10, 30}, DirectedEdges -> True]
fc[i_] := fc[i] = FindCycle[rg, {i}, All]

And then each time you want to compute a new set of cycles, just use:

POSTED BY: W. Craig Carter
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract