# GraphCalc
[![Documentation Status](https://readthedocs.org/projects/graphcalc/badge/?version=latest)](https://graphcalc.readthedocs.io/en/latest/?badge=latest)
## Overview
`graphcalc` is a Python package for performing a variety of graph computations, including maximum clique detection, chromatic number calculation, and vertex cover identification. It is built on top of `networkx` and provides efficient implementations of fundamental graph theory algorithms.
## Features
- **Maximum Clique**: Finds the maximum clique in a given graph.
- **Chromatic Number**: Computes the minimum number of colors required for graph coloring.
- **Vertex and Edge Cover**: Determines vertex and edge covers.
- **Matching and Independence**: Calculates maximum matching and independent sets.
- **Domination Number and its Variants**: Calculates the domination number, total domination number, and many other domination variants.
- **Degree Sequence Invariants**: Calculates the residue, annihilaiton number, the slater number and more!
- **Zero Forcing**: Calculates the zero forcing number, the total zero forcing number, the positive semidefinite zero forcing number, and the power domination number.
## Installation
To install `graphcalc`, make sure you have Python 3.7 or higher, then install it:
```bash
pip install graphcalc
```
## Example Usage
```python
import networkx as nx
import graphcalc as gc
# Calculate and print the independence number of the Petersen graph.
G = nx.petersen_graph()
print(f"independence number of G = {gc.independence_number(G)}")
# Calculate and print the domination number of the Petersen graph.
print(f"domination number of G = {gc.domination_number(G)}")
# Calculate and print the zero forcing number of the Petersen graph.
print(f"zero forcing number of G = {gc.zero_forcing_number(G)}")
```
### Author
Randy Davila, PhD
Raw data
{
"_id": null,
"home_page": "https://github.com/randydavila/graphcalc",
"name": "graphcalc",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "graph theory, networkx, graph computation",
"author": "Randy Davila",
"author_email": "rrd6@rice.edu",
"download_url": "https://files.pythonhosted.org/packages/d3/3e/154b87566cf6ab9b6a5c6c0a6694ae6859402c1b4c0defca32fe084130c0/graphcalc-0.1.11.tar.gz",
"platform": null,
"description": "# GraphCalc\n[![Documentation Status](https://readthedocs.org/projects/graphcalc/badge/?version=latest)](https://graphcalc.readthedocs.io/en/latest/?badge=latest)\n\n\n## Overview\n\n`graphcalc` is a Python package for performing a variety of graph computations, including maximum clique detection, chromatic number calculation, and vertex cover identification. It is built on top of `networkx` and provides efficient implementations of fundamental graph theory algorithms.\n\n## Features\n\n- **Maximum Clique**: Finds the maximum clique in a given graph.\n- **Chromatic Number**: Computes the minimum number of colors required for graph coloring.\n- **Vertex and Edge Cover**: Determines vertex and edge covers.\n- **Matching and Independence**: Calculates maximum matching and independent sets.\n- **Domination Number and its Variants**: Calculates the domination number, total domination number, and many other domination variants.\n- **Degree Sequence Invariants**: Calculates the residue, annihilaiton number, the slater number and more!\n- **Zero Forcing**: Calculates the zero forcing number, the total zero forcing number, the positive semidefinite zero forcing number, and the power domination number.\n\n## Installation\n\nTo install `graphcalc`, make sure you have Python 3.7 or higher, then install it:\n\n```bash\npip install graphcalc\n```\n\n\n## Example Usage\n```python\nimport networkx as nx\nimport graphcalc as gc\n\n# Calculate and print the independence number of the Petersen graph.\nG = nx.petersen_graph()\nprint(f\"independence number of G = {gc.independence_number(G)}\")\n\n# Calculate and print the domination number of the Petersen graph.\nprint(f\"domination number of G = {gc.domination_number(G)}\")\n\n# Calculate and print the zero forcing number of the Petersen graph.\nprint(f\"zero forcing number of G = {gc.zero_forcing_number(G)}\")\n```\n\n\n### Author\nRandy Davila, PhD\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Python package for graph computation functions",
"version": "0.1.11",
"project_urls": {
"Documentation": "https://graphcalc.readthedocs.io/en/latest/",
"Homepage": "https://github.com/randydavila/graphcalc",
"PyPI": "https://pypi.org/project/graphcalc/",
"Source Code": "https://github.com/yourusername/graphcalc"
},
"split_keywords": [
"graph theory",
" networkx",
" graph computation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d7b3856bc75afc7c037a89a27b929b5f59b15cdad6f0499d1e6c0de26a22a781",
"md5": "0d806386988499a1f7fdda1714127e79",
"sha256": "3cf5465a42d749126d16592e23d27ce9f1a78319ecdcef8387ab1ba7c025f8f6"
},
"downloads": -1,
"filename": "graphcalc-0.1.11-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0d806386988499a1f7fdda1714127e79",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 25533,
"upload_time": "2024-11-18T04:33:47",
"upload_time_iso_8601": "2024-11-18T04:33:47.541866Z",
"url": "https://files.pythonhosted.org/packages/d7/b3/856bc75afc7c037a89a27b929b5f59b15cdad6f0499d1e6c0de26a22a781/graphcalc-0.1.11-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d33e154b87566cf6ab9b6a5c6c0a6694ae6859402c1b4c0defca32fe084130c0",
"md5": "2760e443093043196a16eecd9b7f67ef",
"sha256": "df09d3647475ce0de61e8096a461d416b9ab533baf54bd9ed18ecfd65e8f0458"
},
"downloads": -1,
"filename": "graphcalc-0.1.11.tar.gz",
"has_sig": false,
"md5_digest": "2760e443093043196a16eecd9b7f67ef",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 21466,
"upload_time": "2024-11-18T04:33:49",
"upload_time_iso_8601": "2024-11-18T04:33:49.173726Z",
"url": "https://files.pythonhosted.org/packages/d3/3e/154b87566cf6ab9b6a5c6c0a6694ae6859402c1b4c0defca32fe084130c0/graphcalc-0.1.11.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-18 04:33:49",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "randydavila",
"github_project": "graphcalc",
"github_not_found": true,
"lcname": "graphcalc"
}