Skip to main content

Ellipsoid Method in Python

Project description

Project generated with PyScaffold Documentation Status codecov

🥅 netlistx

Netlist and its related Algorithms in Python

This library defines a set of classes and functions for working with netlists, which are representations of electronic circuits. The main purpose of this library is to provide tools for creating, manipulating, and analyzing netlists.

The library doesn't take any direct inputs or produce any outputs on its own. Instead, it defines classes and functions that can be used by other parts of a program to work with netlists.

The main class in this library is the Netlist class. It represents a netlist as a graph, where modules (like electronic components) are connected by nets (like wires). The Netlist class takes three inputs when created: a graph representing the connections, a list of modules, and a list of nets.

The Netlist class provides several methods to get information about the netlist, such as the number of modules, nets, nodes, and pins. It also allows you to get the weight of modules and nets, which could represent things like the size or importance of components in the circuit.

The library includes several helper functions to create specific types of netlists. For example, create_inverter() creates a netlist representing a simple inverter circuit, while create_random_hgraph() creates a random netlist with a specified number of modules and nets.

The library uses graph theory concepts to represent the netlist. It uses the NetworkX library to handle the graph operations. The graph is represented as nodes (modules and nets) connected by edges (connections between modules and nets).

One important aspect of the library is how it handles the weights of modules and nets. It uses a RepeatArray class (which is not defined in this file) to efficiently store weights when many components have the same weight.

This library also implements several algorithms for solving different types of graph problems in graphs. The main purpose is to find minimal sets of vertices or edges that "cover" certain structures in a graph, such as all edges, cycles, or odd cycles.

The library takes various inputs depending on the specific function being used. Generally, it requires a graph structure (either a regular graph or a hypergraph), a weight mapping for the vertices, and sometimes an optional initial set. The graphs are typically represented using the NetworkX library (nx.Graph).

The outputs produced by these functions are usually a tuple containing two elements: a set representing the minimal cover found, and a number representing the total weight or cost of that cover.

The library achieves its purpose through several different algorithms, but they all follow a similar pattern called the primal-dual approximation method. This method iteratively builds a solution by selecting elements that violate certain conditions and adding them to the cover set.

The library uses several important data structures and algorithms. Graphs are represented using NetworkX, which provides efficient graph operations. The algorithms make heavy use of sets for storing covers and dictionaries for storing weights and other information. The cycle-finding algorithms use breadth-first search and clever bookkeeping to efficiently detect cycles in the graph.

The library also includes functions for reading netlists from JSON files and for creating specific test netlists. These functions could be useful for testing or demonstrating the capabilities of the Netlist class.

Overall, this library provides a foundation for working with netlists in Python. It allows programmers to create, manipulate, and analyze netlists, which could be useful in electronic design automation tools or circuit analysis software.

Depend on

👀 See also

Used by

👉 Note

This project has been set up using PyScaffold 4.5. For details and usage information on PyScaffold see https://pyscaffold.org/.

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

netlistx-0.3.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netlistx-0.3-py3-none-any.whl (38.9 kB view details)

Uploaded Python 3

File details

Details for the file netlistx-0.3.tar.gz.

File metadata

  • Download URL: netlistx-0.3.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for netlistx-0.3.tar.gz
Algorithm Hash digest
SHA256 edc49d8be6a7bdeef2f2cd2848eaffe9e5d4e6f7c627061e50278d823e90279a
MD5 4e92ba33d931a9e2364dd2f125c22709
BLAKE2b-256 b7c9ed0d1175210cad7d9277ba24f846b65e3a76d2591d0e63594dcacd22f68d

See more details on using hashes here.

Provenance

The following attestation bundles were made for netlistx-0.3.tar.gz:

Publisher: python-publish.yml on luk036/netlistx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file netlistx-0.3-py3-none-any.whl.

File metadata

  • Download URL: netlistx-0.3-py3-none-any.whl
  • Upload date:
  • Size: 38.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for netlistx-0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8af5e2a37737f4d3bc42b957401238aa146b39419916161eef1a0813077611be
MD5 ce5eecfd42f482ca3c0c478841ae1a6c
BLAKE2b-256 81a269c259fb4a571a25e219a4ee3d9fb55b025f4418e3f25e2152123661a53d

See more details on using hashes here.

Provenance

The following attestation bundles were made for netlistx-0.3-py3-none-any.whl:

Publisher: python-publish.yml on luk036/netlistx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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