I have a question, which I failed to find an answer to myself. I'm a casual user of Mathematica, but do have some knowledge about Dynamic module and other "Advanced" features.
My problem is formulated as follows:
1) I have a graph, which is built on 2*n vertices and contains k (for simplicity we can start with k = 2) perfect matchings on it.
2) I have an operation, that changes the graph by deleting l (again, let us take the simplest case of l = 2) edges from some matching and replacing them with l edges on same set of 2*l vertices.
3) I want to observe a process of random application of such operations to initially supplied graph. And I want to collect some data on every step to further visualize it.
Is it possible, using the dynamic module system to perform step-by-step iteration over the data structure? Say I don't want to get the result of application of z random operations on the graph at once, but would rather observe every step with control over the flow by some sort of "next" button.
The issue, as I see it, lies in following: even if I create a dynamic module for my case, and z will be used as a dynamic variable, specifying how many random operation I want to perform, changing it from z to z + 1 will reapply all z + 1 operations, rather than perform a single additional one.
Is there a way to use some kind of history for Dynamic module? Saying if I go forward, use previous result and update it by one?
Hope I've explained it understandably =)