A Graph Abstract Data Type
Project description
Ouroboroslib
A Graph Abstract Data Type Library. Named after the symbol of a serprent eating its own tail.
Installation
pip3 install ouroboroslib
Usage
from ouroboroslib import OuroborosGraph
ouroboros = OuroborosGraph(directed=True)
# Each tuple in the edge list is (starting_node, ending_node, edge_value)
ouroboros.overwrite_graph(edge_list=[(1, 2, 7), (2, 3, 10)])
ouroboros.add_node(4)
ouroboros.add_edge(3, 4, value=7)
ouroboros.delete_node(2)
# {(3, 4, 7)} - only 1 edge because node 2 is deleted
edges = ouroboros.tuple_edges()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ouroboroslib-0.0.2.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for ouroboroslib-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd550413e6e3ed529733ed118c352a8fc4fbe23af193002d5a20efba999f7c3f |
|
MD5 | 1588590a62d71bc9f3ec89aee9191bd7 |
|
BLAKE2b-256 | 2e9b17de49db026a022c8a8eea86870e9452588420432ed6978ba48d768d8d08 |