{ "info": { "author": "Benjamin F. Maier", "author_email": "bfmaier@physik.hu-berlin.de", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3" ], "description": "smallworld\n==========\n\nGenerate and analyze small-world networks according to the revised\nWatts-Strogatz model where the randomization at *\u03b2* = 1 is truly equal to the Erd\u0151s-R\u00e9nyi network model.\n\nIn the Watts-Strogatz model each node rewires its *k*/2\nrightmost edges with probality *\u03b2*. This means that each node has halways\nminimum degree *k*/2. Also, at *\u03b2* = 1, each edge has been rewired.\nHence the probability of it existing is smaller than *k*/(*N*-1), contrary to the ER model.\n\nIn the adjusted model, each pair of nodes is connected with a certain\nconnection probability. If the lattice distance between the potentially\nconnected nodes is d(i,j) <= *k*/2 then they are connected with\nshort-range probability ``p_S = k / (k + \u03b2 (N-1-k))``, otherwise they're\nconnected with long-range probability ``p_L = \u03b2 * p_S``.\n\nInstall\n-------\n\n::\n\n pip install smallworld\n\nBeware: ``smallworld`` only works with Python 3!\n\nExample\n-------\n\nIn the following example you can see how to generate and draw according\nto the model described above.\n\n.. code:: python\n\n from smallworld.draw import draw_network\n from smallworld import get_smallworld_graph\n\n import matplotlib.pyplot as pl\n\n # define network parameters\n N = 21\n k_over_2 = 2\n betas = [0, 0.025, 1.0]\n labels = [ r'$\\beta=0$', r'$\\beta=0.025$', r'$\\beta=1$']\n\n focal_node = 0\n\n fig, ax = pl.subplots(1,3,figsize=(9,3))\n\n\n # scan beta values\n for ib, beta in enumerate(betas):\n\n # generate small-world graphs and draw\n G = get_smallworld_graph(N, k_over_2, beta)\n draw_network(G,k_over_2,focal_node=focal_node,ax=ax[ib])\n\n ax[ib].set_title(labels[ib],fontsize=11)\n\n # show\n pl.subplots_adjust(wspace=0.3)\n pl.show()\n\n.. figure:: https://github.com/benmaier/smallworld/raw/master/sandbox/small_worlds.png\n :alt: visualization example\n\n visualization example", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/benmaier/pysmallworld", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "smallworld", "package_url": "https://pypi.org/project/smallworld/", "platform": "", "project_url": "https://pypi.org/project/smallworld/", "project_urls": { "Homepage": "https://github.com/benmaier/pysmallworld" }, "release_url": "https://pypi.org/project/smallworld/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "Generate modified small-world networks and compare with theoretical predictions.", "version": "0.0.2" }, "last_serial": 4673469, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "91b46542e7596a5345fc413175fbfc43", "sha256": "7059509d4145dbf605a97edc85780f762e894c2dd74a2f5849a35f33c1775198" }, "downloads": -1, "filename": "smallworld-0.0.1.tar.gz", "has_sig": false, "md5_digest": "91b46542e7596a5345fc413175fbfc43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7582, "upload_time": "2019-01-08T16:15:55", "url": "https://files.pythonhosted.org/packages/09/47/a41fdaed2973af7477178716417daa7f41c857c1b7eff68cf365f2db37bb/smallworld-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "62c02a0b971d94c543324b34c5ddd97d", "sha256": "4cd8e30bd795afc00558f25c71f9c6f3f94e094f2d925e6f8c94404fba56ef5f" }, "downloads": -1, "filename": "smallworld-0.0.2.tar.gz", "has_sig": false, "md5_digest": "62c02a0b971d94c543324b34c5ddd97d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7585, "upload_time": "2019-01-08T16:23:16", "url": "https://files.pythonhosted.org/packages/09/25/88d61bbca9ab3f6f6a194dde4f952d63d014a2bad2793be98dea966a6d7d/smallworld-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "62c02a0b971d94c543324b34c5ddd97d", "sha256": "4cd8e30bd795afc00558f25c71f9c6f3f94e094f2d925e6f8c94404fba56ef5f" }, "downloads": -1, "filename": "smallworld-0.0.2.tar.gz", "has_sig": false, "md5_digest": "62c02a0b971d94c543324b34c5ddd97d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7585, "upload_time": "2019-01-08T16:23:16", "url": "https://files.pythonhosted.org/packages/09/25/88d61bbca9ab3f6f6a194dde4f952d63d014a2bad2793be98dea966a6d7d/smallworld-0.0.2.tar.gz" } ] }