3 ms·
Do you know of a tool to draw a graph from a matrix or vice-versa. It doesn't sound too hard but I'm sure there are wrinkles.
by emmelaich 4y ago
Do you know of a tool to draw a graph from a matrix or vice-versa.
It doesn't sound too hard but I'm sure there are wrinkles.
- kejaed 4y agoI wrote a tool at work for this. Using python to read in an Excel workbook with states and events in rows and columns that outputs a PlantUML state machine description. Worked really nicely, but not available for open sourcing at the moment.
- viraptor 4y agoJust write one yourself. It's really trivial to do. Foreach node Foreach node.transition Matrix(node, transition.event) = transition.destination And the other way: Foreach node Foreach event Destination = matrix(node, event) Graph(node).add(event, destination)
- adammarples 4y agoUsing python it's quite straightforward to convert between numpy arrays and sparse arrays, which are basically the graph represtation of the same data.