Python module for working with L-graphs
Project description
lgraph
Python module for working with L-graphs.
Installation
pip install l-graph
Creating an L-graph
lg = LGraph(3)
lg.add_edge(lg.initial_main.name, '0')
lg.add_edge('0', '1', label='b', round_trace=')', square_trace='[')
lg.add_edge('1', '2', label='c', square_trace=']')
lg.add_edge('2', lg.final_main.name)
lg.add_edge('0', '0', label='a', round_trace='(')
lg.add_edge('1', '1', label='b', round_trace=')', square_trace='[')
lg.add_edge('2', '2', label='c', square_trace=']')
Saving and loading using files
lg.save('graph_examples/a^n_b^n_c^n')
lg.load('graph_examples/a^n_b^n')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.