Skip to main content

Python module for working with L-graphs

Project description

lgraph

Python module for working with L-graphs.

Installation

pip install lgraph

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 Distribution

l-graph-0.2.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distribution

l_graph-0.2-py3-none-any.whl (6.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page