{"id":21030528,"url":"https://github.com/imdeep2905/kcol-graph","last_synced_at":"2025-03-13T19:25:27.132Z","repository":{"id":216248622,"uuid":"640393100","full_name":"imdeep2905/kcol-graph","owner":"imdeep2905","description":"A minimalistic python package to generate a k-colorable graph.","archived":false,"fork":false,"pushed_at":"2023-06-19T01:48:51.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-30T00:47:00.798Z","etag":null,"topics":["graph","graph-coloring","graph-generation","graph-generator","k-colorable"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/kcol-graph-gen/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/imdeep2905.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-05-13T23:52:00.000Z","updated_at":"2023-05-14T18:47:01.000Z","dependencies_parsed_at":"2024-01-09T07:56:01.822Z","dependency_job_id":"18d6b31a-5ec6-4635-9eda-68c8b370377b","html_url":"https://github.com/imdeep2905/kcol-graph","commit_stats":null,"previous_names":["imdeep2905/kcol-graph"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imdeep2905%2Fkcol-graph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imdeep2905%2Fkcol-graph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imdeep2905%2Fkcol-graph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imdeep2905%2Fkcol-graph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imdeep2905","download_url":"https://codeload.github.com/imdeep2905/kcol-graph/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243466988,"owners_count":20295310,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["graph","graph-coloring","graph-generation","graph-generator","k-colorable"],"created_at":"2024-11-19T12:18:50.534Z","updated_at":"2025-03-13T19:25:27.099Z","avatar_url":"https://github.com/imdeep2905.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kcol_graph_gen [![Downloads](https://static.pepy.tech/personalized-badge/kcol-graph-gen?period=total\u0026units=international_system\u0026left_color=black\u0026right_color=blue\u0026left_text=Downloads)](https://pepy.tech/project/kcol-graph-gen)\n\n![Cover Logo](https://github.com/imdeep2905/kcol-graph/blob/main/assets/cover.png?raw=true)\n\n_A minimalistic python package to generate a k-colorable graph._\n\n# Installation\n\nJust run `pip install kcol-graph-gen` and you are good to go!\n\n# Usage\n\nBefore generating the graph you have to make an object of the class `KColorableGraphGenerator`. You can specify an optional `seed` for the default `random` package which is used during the generation of the graph.\n\nOnce the object is crated, you can use `generate` method to generate the graphs. This takes three arguments `n` : number of vertices, `k` : specifying the number of colors, `p(optional, default=0.5)` : Probability with which any edge is added into the graph. Higher the value of `p` denser the resulting graph will be.\n\nBelow is the code snippet which demonstrates the usage:\n\n```\nfrom kcol_graph_gen import KColorableGraphGenerator\n\ngenerator = KColorableGraphGenerator(seed=42)\nedges = generator.generate(4, 2, 0.3)  # Create a bipartite graph\n\nprint(edges)  # Printing the list of edges\n# \u003e [(2, 3), (2, 4), (1, 2)]\n\nedges = generator.generate(\n    6, 3, 0.9\n)  # Create a 3-colorable dense graph with 6 vertices\n\nprint(edges)  # Printing the list of edges\n# \u003e [(2, 4), (1, 2), (3, 4), (1, 5), (2, 3), (4, 5), (2, 6), (5, 6), (3, 6), (2, 5), (1, 3)]\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimdeep2905%2Fkcol-graph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimdeep2905%2Fkcol-graph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimdeep2905%2Fkcol-graph/lists"}