# Rapid Multi-Objective Community Detection
> **Warning:**
>
> This project is in its early stages, and the algorithm is still being refined. Performance and results may not be optimal yet.
## Overview
This project aims to develop a high-performance genetic algorithm in Rust to detect communities in a graph. The goal is to optimize the community detection process to handle large-scale graphs efficiently.
> **Why Rust?**
>
> Rust is one of the fastest programming languages available, offering high-performance execution and memory safety without a garbage collector. It has a rich ecosystem of libraries.
## Usage
### Requirements
Before running the algorithm, you'll need an edge list file formatted as follows:
```plaintext
0,1,{'weight': 4}
0,2,{'weight': 5}
0,3,{'weight': 3}
...
0,10,{'weight': 2}
```
The **weight** attribute is optional. If not provided, it can be represented by an empty dictionary: `{}`.
### Installation via PyPI
The library is available on PyPI. You can install it using `pip`:
```bash
pip install rmocd
```
#### Simple Example (Python)
Here's a simple example of how to use the library in Python:
```python
import rmocd
edgelist_file = "res/graphs/artificials/article.edgelist"
partition, modularity = rmocd.run(edgelist_file)
```
You can see an [example of plotting](res/example.py), or an example of how to [make comparisons](res/example.py) with other algorithms in `res/`.
<center>
![Example Plot](res/example.png)
</center>
### Running from Scratch
#### Build and Run
1. Clone the repository and navigate to the project folder:
```bash
git clone https://github.com/0l1ve1r4/rmocd
cd rmocd
```
2. Compile and run the algorithm with your edge list file:
```bash
cargo run --release mygraph.edgelist
```
#### Debug Mode
To run the algorithm in debug mode, use the `-d` flag:
```bash
cargo run --release mygraph.edgelist -d
```
This will provide additional debug output, useful for troubleshooting and monitoring the algorithm's progress.
Raw data
{
"_id": null,
"home_page": null,
"name": "rmocd",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "rust, python, community detection, multi-objective optimization, graph analysis",
"author": "Guilherme Santos",
"author_email": "Guilherme Santos <gs.oliveira.dev@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/1b/fc/c758c297e6b311e3df1a331c7d536fefd12f339d55a4dab25e4be396eff2/rmocd-1.0.0.tar.gz",
"platform": null,
"description": "# Rapid Multi-Objective Community Detection\n\n> **Warning:** \n>\n> This project is in its early stages, and the algorithm is still being refined. Performance and results may not be optimal yet.\n\n## Overview\n\nThis project aims to develop a high-performance genetic algorithm in Rust to detect communities in a graph. The goal is to optimize the community detection process to handle large-scale graphs efficiently.\n\n> **Why Rust?** \n>\n> Rust is one of the fastest programming languages available, offering high-performance execution and memory safety without a garbage collector. It has a rich ecosystem of libraries.\n\n## Usage\n\n### Requirements\n\nBefore running the algorithm, you'll need an edge list file formatted as follows:\n\n```plaintext\n0,1,{'weight': 4}\n0,2,{'weight': 5}\n0,3,{'weight': 3}\n...\n0,10,{'weight': 2}\n```\n\nThe **weight** attribute is optional. If not provided, it can be represented by an empty dictionary: `{}`.\n\n### Installation via PyPI\n\nThe library is available on PyPI. You can install it using `pip`:\n\n```bash\npip install rmocd\n```\n\n#### Simple Example (Python)\n\nHere's a simple example of how to use the library in Python:\n\n```python\nimport rmocd\n\nedgelist_file = \"res/graphs/artificials/article.edgelist\"\npartition, modularity = rmocd.run(edgelist_file)\n```\n\nYou can see an [example of plotting](res/example.py), or an example of how to [make comparisons](res/example.py) with other algorithms in `res/`.\n\n<center>\n\n![Example Plot](res/example.png)\n\n</center>\n\n### Running from Scratch\n\n#### Build and Run\n\n1. Clone the repository and navigate to the project folder:\n ```bash\n git clone https://github.com/0l1ve1r4/rmocd\n cd rmocd\n ```\n\n2. Compile and run the algorithm with your edge list file:\n ```bash\n cargo run --release mygraph.edgelist\n ```\n\n#### Debug Mode\n\nTo run the algorithm in debug mode, use the `-d` flag:\n```bash\ncargo run --release mygraph.edgelist -d\n```\n\nThis will provide additional debug output, useful for troubleshooting and monitoring the algorithm's progress.\n",
"bugtrack_url": null,
"license": "GPL-3.0-or-later",
"summary": "Rapid multi-objective community detection with parallel computation and caching to efficiently handle large-scale graphs.",
"version": "1.0.0",
"project_urls": {
"Issues": "https://github.com/0l1ve1r4/rmocd/issues",
"Repository": "https://github.com/0l1ve1r4/rmocd"
},
"split_keywords": [
"rust",
" python",
" community detection",
" multi-objective optimization",
" graph analysis"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f0fa232f4cde1e1066c29a08cd9ad2dd5bfe697f09a44d12ef6c1ea8d77a0400",
"md5": "ac9323de1dacb8072fe37b7252637d7c",
"sha256": "d5eadaa468ece05169f39af9d15744768e03ff6b60b1d6ad589db0d4668b4a2d"
},
"downloads": -1,
"filename": "rmocd-1.0.0-cp310-cp310-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "ac9323de1dacb8072fe37b7252637d7c",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": null,
"size": 273195,
"upload_time": "2024-12-27T16:14:31",
"upload_time_iso_8601": "2024-12-27T16:14:31.937546Z",
"url": "https://files.pythonhosted.org/packages/f0/fa/232f4cde1e1066c29a08cd9ad2dd5bfe697f09a44d12ef6c1ea8d77a0400/rmocd-1.0.0-cp310-cp310-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "92fb283baff0c99eccaae96601cce97fd796e06bcf900f0e8e5e9ebf99163354",
"md5": "f7d4baabeff1240e0ac62a27edb43e9c",
"sha256": "2b0116f422b97476c6376530c2c468e8f691551e8eb58864d59b331454b49e5f"
},
"downloads": -1,
"filename": "rmocd-1.0.0-cp310-cp310-manylinux_2_34_x86_64.whl",
"has_sig": false,
"md5_digest": "f7d4baabeff1240e0ac62a27edb43e9c",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": null,
"size": 313203,
"upload_time": "2024-12-27T16:14:34",
"upload_time_iso_8601": "2024-12-27T16:14:34.618528Z",
"url": "https://files.pythonhosted.org/packages/92/fb/283baff0c99eccaae96601cce97fd796e06bcf900f0e8e5e9ebf99163354/rmocd-1.0.0-cp310-cp310-manylinux_2_34_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "84d225b4fc1726c42f72882be3caa525103123ad21a138afff9498063074571b",
"md5": "f70399ae482bd0aefbe30cb7aae1deff",
"sha256": "7a4608eed7e8a898e4574886cbecd0cf5bf6accd5cb4c7266a42ab15778ca89c"
},
"downloads": -1,
"filename": "rmocd-1.0.0-cp310-cp310-win_amd64.whl",
"has_sig": false,
"md5_digest": "f70399ae482bd0aefbe30cb7aae1deff",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": null,
"size": 215649,
"upload_time": "2024-12-27T16:14:37",
"upload_time_iso_8601": "2024-12-27T16:14:37.142868Z",
"url": "https://files.pythonhosted.org/packages/84/d2/25b4fc1726c42f72882be3caa525103123ad21a138afff9498063074571b/rmocd-1.0.0-cp310-cp310-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e181b3ac038fed99068e2f106d15b40bb9fc721ccd457b354f9c6aba34bb4347",
"md5": "1d823436e2d3e253c6dd36f03bc013f9",
"sha256": "12608225fd130c4708215a9cb015faf803abe1684b2652a216478a5961df1743"
},
"downloads": -1,
"filename": "rmocd-1.0.0-cp311-cp311-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "1d823436e2d3e253c6dd36f03bc013f9",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": null,
"size": 273207,
"upload_time": "2024-12-27T16:14:39",
"upload_time_iso_8601": "2024-12-27T16:14:39.745466Z",
"url": "https://files.pythonhosted.org/packages/e1/81/b3ac038fed99068e2f106d15b40bb9fc721ccd457b354f9c6aba34bb4347/rmocd-1.0.0-cp311-cp311-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "266f7f0effa8f9adccad60ba3eaed6829ebefb9cd52eef3911515c74a8475424",
"md5": "abe941774cc67810bb53670f3d61bb81",
"sha256": "b14f27f3aefb29b2931c0ea40a62cbe5059299e4332754f0de7012809730fb13"
},
"downloads": -1,
"filename": "rmocd-1.0.0-cp311-cp311-manylinux_2_34_x86_64.whl",
"has_sig": false,
"md5_digest": "abe941774cc67810bb53670f3d61bb81",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": null,
"size": 313177,
"upload_time": "2024-12-27T16:14:41",
"upload_time_iso_8601": "2024-12-27T16:14:41.206026Z",
"url": "https://files.pythonhosted.org/packages/26/6f/7f0effa8f9adccad60ba3eaed6829ebefb9cd52eef3911515c74a8475424/rmocd-1.0.0-cp311-cp311-manylinux_2_34_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c08d2ae885b44ed6cfffd361c6c242365d44e51375ce909f51c816d6a389e58c",
"md5": "7e6d952f81ad31db290be3138ca78f9c",
"sha256": "42d94fe8614da20c9797088a918c230293e79e67fcf6c723f4b0e064704fea01"
},
"downloads": -1,
"filename": "rmocd-1.0.0-cp311-cp311-win_amd64.whl",
"has_sig": false,
"md5_digest": "7e6d952f81ad31db290be3138ca78f9c",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": null,
"size": 215595,
"upload_time": "2024-12-27T16:14:43",
"upload_time_iso_8601": "2024-12-27T16:14:43.738076Z",
"url": "https://files.pythonhosted.org/packages/c0/8d/2ae885b44ed6cfffd361c6c242365d44e51375ce909f51c816d6a389e58c/rmocd-1.0.0-cp311-cp311-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "86f0f2a37eb1761f0f521e647fb302a8f95cba7ab0b12cd65c9e151f7d890083",
"md5": "a865920ed26348b8a8bb18e649f259cf",
"sha256": "08074f69a512c3776e8c3c788bfc4b6a20c01212ab38c8610c7c29fb307778cd"
},
"downloads": -1,
"filename": "rmocd-1.0.0-cp312-cp312-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "a865920ed26348b8a8bb18e649f259cf",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": null,
"size": 271921,
"upload_time": "2024-12-27T16:14:46",
"upload_time_iso_8601": "2024-12-27T16:14:46.261631Z",
"url": "https://files.pythonhosted.org/packages/86/f0/f2a37eb1761f0f521e647fb302a8f95cba7ab0b12cd65c9e151f7d890083/rmocd-1.0.0-cp312-cp312-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "635ae8b6ec9f1c77657c3235257407b29148480bb0da349bff5538468bab1d9b",
"md5": "d9886a3618763b94ececf05b251a2718",
"sha256": "8123da3b7f49860b1e8b64ec6ea8a4f14df32c316236ccb06f695c1733dc05e6"
},
"downloads": -1,
"filename": "rmocd-1.0.0-cp312-cp312-manylinux_2_34_x86_64.whl",
"has_sig": false,
"md5_digest": "d9886a3618763b94ececf05b251a2718",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": null,
"size": 314145,
"upload_time": "2024-12-27T16:14:49",
"upload_time_iso_8601": "2024-12-27T16:14:49.441114Z",
"url": "https://files.pythonhosted.org/packages/63/5a/e8b6ec9f1c77657c3235257407b29148480bb0da349bff5538468bab1d9b/rmocd-1.0.0-cp312-cp312-manylinux_2_34_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e6896988cdff7994472c95b4c3b0dc3b6fb6d66a166bb80b43d80c052fbff2cd",
"md5": "c7b788ae5db149ddc461f862670fb50c",
"sha256": "8c6ac66521cb0e6b687cdef70b44e2776bbf48fd95973bcfca19973c9b409fc3"
},
"downloads": -1,
"filename": "rmocd-1.0.0-cp312-cp312-win_amd64.whl",
"has_sig": false,
"md5_digest": "c7b788ae5db149ddc461f862670fb50c",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": null,
"size": 215384,
"upload_time": "2024-12-27T16:14:52",
"upload_time_iso_8601": "2024-12-27T16:14:52.158172Z",
"url": "https://files.pythonhosted.org/packages/e6/89/6988cdff7994472c95b4c3b0dc3b6fb6d66a166bb80b43d80c052fbff2cd/rmocd-1.0.0-cp312-cp312-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "3a234a9759418df0a14822998b1d250a5417aaac4c5f107e63366dd39de663e0",
"md5": "beaae51e242afe0ef5bd5b3d22832736",
"sha256": "d50fb98f9ea9e7afc1181880babddca22d1099069ca40a01c60afeeb48240e04"
},
"downloads": -1,
"filename": "rmocd-1.0.0-cp38-cp38-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "beaae51e242afe0ef5bd5b3d22832736",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": null,
"size": 273153,
"upload_time": "2024-12-27T16:14:53",
"upload_time_iso_8601": "2024-12-27T16:14:53.458395Z",
"url": "https://files.pythonhosted.org/packages/3a/23/4a9759418df0a14822998b1d250a5417aaac4c5f107e63366dd39de663e0/rmocd-1.0.0-cp38-cp38-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "7f89140658a595aa2e51799b07980fa04e67b17ef037539b4b0251455fc78b3d",
"md5": "8047d77e20aab28b5794c77b8cc50f21",
"sha256": "cfabce36c58c603447c5ed87e32dc7c503dc832f33b4049acc6844d3851c05b2"
},
"downloads": -1,
"filename": "rmocd-1.0.0-cp38-cp38-manylinux_2_34_x86_64.whl",
"has_sig": false,
"md5_digest": "8047d77e20aab28b5794c77b8cc50f21",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": null,
"size": 313013,
"upload_time": "2024-12-27T16:14:55",
"upload_time_iso_8601": "2024-12-27T16:14:55.939014Z",
"url": "https://files.pythonhosted.org/packages/7f/89/140658a595aa2e51799b07980fa04e67b17ef037539b4b0251455fc78b3d/rmocd-1.0.0-cp38-cp38-manylinux_2_34_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c124c39900f8945f29387fcb912607ac1b0e52e7fb80dd6e0289de8363a0caaf",
"md5": "72c6bf58478b66904e72a539f7b0b5bd",
"sha256": "078575bdff5011814e1de103e7d6e7647b95bed918f974b73c6e25c2e94ff838"
},
"downloads": -1,
"filename": "rmocd-1.0.0-cp38-cp38-win_amd64.whl",
"has_sig": false,
"md5_digest": "72c6bf58478b66904e72a539f7b0b5bd",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": null,
"size": 215409,
"upload_time": "2024-12-27T16:14:57",
"upload_time_iso_8601": "2024-12-27T16:14:57.226941Z",
"url": "https://files.pythonhosted.org/packages/c1/24/c39900f8945f29387fcb912607ac1b0e52e7fb80dd6e0289de8363a0caaf/rmocd-1.0.0-cp38-cp38-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b40bd4f61cf50bde729f4d63f2e689acd1fe7bb7663fd1194af5c1b78d210510",
"md5": "aca67ebe80926fdce5df2e00509e51db",
"sha256": "7a0e83c47856ab2f34bef45ee5dc75ee906ef31974117c193833e7d5285f2004"
},
"downloads": -1,
"filename": "rmocd-1.0.0-cp39-cp39-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "aca67ebe80926fdce5df2e00509e51db",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": null,
"size": 273276,
"upload_time": "2024-12-27T16:14:58",
"upload_time_iso_8601": "2024-12-27T16:14:58.574981Z",
"url": "https://files.pythonhosted.org/packages/b4/0b/d4f61cf50bde729f4d63f2e689acd1fe7bb7663fd1194af5c1b78d210510/rmocd-1.0.0-cp39-cp39-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c96be00ff5cbd3ea9cc9abe545ba2ebf99c503db0a7b0b871c23030f3938e42c",
"md5": "6d284a3f09d131353af254851868266b",
"sha256": "ada0ddb7bf4e963e18ad33e2de784fe5b011e359910c04c04cb378e923810c63"
},
"downloads": -1,
"filename": "rmocd-1.0.0-cp39-cp39-manylinux_2_34_x86_64.whl",
"has_sig": false,
"md5_digest": "6d284a3f09d131353af254851868266b",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": null,
"size": 313272,
"upload_time": "2024-12-27T16:15:01",
"upload_time_iso_8601": "2024-12-27T16:15:01.316465Z",
"url": "https://files.pythonhosted.org/packages/c9/6b/e00ff5cbd3ea9cc9abe545ba2ebf99c503db0a7b0b871c23030f3938e42c/rmocd-1.0.0-cp39-cp39-manylinux_2_34_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "da3ce7fd62a8b9999290fb2490737421941df43e3bed45656ceeac25ce232e49",
"md5": "c9b47a21b65ee483aa596ed1ddea5955",
"sha256": "feaadc9a7e11d213b8477e820d6a4fd046bf11f477870ee67e9165daef599bed"
},
"downloads": -1,
"filename": "rmocd-1.0.0-cp39-cp39-win_amd64.whl",
"has_sig": false,
"md5_digest": "c9b47a21b65ee483aa596ed1ddea5955",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": null,
"size": 215588,
"upload_time": "2024-12-27T16:15:02",
"upload_time_iso_8601": "2024-12-27T16:15:02.613160Z",
"url": "https://files.pythonhosted.org/packages/da/3c/e7fd62a8b9999290fb2490737421941df43e3bed45656ceeac25ce232e49/rmocd-1.0.0-cp39-cp39-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1bfcc758c297e6b311e3df1a331c7d536fefd12f339d55a4dab25e4be396eff2",
"md5": "837914ee260e173741eb86187a977164",
"sha256": "128c8cd3453466729217dea236b8abc078ae92badcb9f829d56633fa4628875b"
},
"downloads": -1,
"filename": "rmocd-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "837914ee260e173741eb86187a977164",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 290102,
"upload_time": "2024-12-27T16:15:03",
"upload_time_iso_8601": "2024-12-27T16:15:03.913528Z",
"url": "https://files.pythonhosted.org/packages/1b/fc/c758c297e6b311e3df1a331c7d536fefd12f339d55a4dab25e4be396eff2/rmocd-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-27 16:15:03",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "0l1ve1r4",
"github_project": "rmocd",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "rmocd"
}