Network science abstract data types
Project description
SCINET
Graph theory abstract data type.
scinet.Graph is designed upon the graph (abstract data type) definition and functions as a bare bones skeletal graph data mapping, containing abstract vertices and edges.
Includes DiGraph and MultiGraph support, with HyperGraph capabilities.
Installation
- Install Python >= 3.8
- Install scinet
$ pip install scinet
Usage
Import scinet
import scinet as sn
Create graph
G = sn.Graph()
Manipulate data
- add_vertex
G.add_vertex(vertex := "foo")
- add_edge
Edges must be assigned using hashable keys so that no name conflicts exist between source_vertex and target_vertex edges
key = G.add_edge(source_vertex := "foo", target_vertex := "bar"[, edge := "foobar"])
- remove_vertex
G.remove_vertex(vertex := "foo")
- remove_edge
G.remove_edge(source_vertex := "foo", target_vertex := "bar"[, edge := "foobar"])")
- adjacent
(target_vertex := "bar") in G[(source_vertex := "foo")]
>>> True
- neighbors
set(G[(vertex := "foo")])
>>> { "neighbor_1", "neighbor_2", ... }
See docs for further details.
Contributors
- JoshGoA - Main contributor - GitHub
TODO
- Graph visualization
Create "matplotlib.pyplot" supported API
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
scinet-JoshGoA-0.4.9.tar.gz
(4.2 kB
view hashes)
Built Distribution
Close
Hashes for scinet_JoshGoA-0.4.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 890edc99d62ed1a4d2794f092499d3d060272b60581910c815d0b55fd482e36a |
|
MD5 | 7b802d10f667dd7c0540cba4cb1d39bd |
|
BLAKE2b-256 | e99b6c0c9599b50b26af1ac3e98460830e38e993b6300958d91054bc90aa956d |