Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

scinet-josugoar

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scinet-josugoar

Network science abstract data types

  • 0.5.5
  • Source
  • PyPI
  • Socket score

Maintainers
1

scinet

build author license pypi python

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

  1. Install Python >= 3.8
  2. Install scinet
$ pip install scinet-josugoar

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

  • josugoar - Main contributor - GitHub

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc