{"id":20669497,"url":"https://github.com/iitis/labelledgraphs.jl","last_synced_at":"2025-06-24T15:37:19.416Z","repository":{"id":43737174,"uuid":"344474385","full_name":"iitis/LabelledGraphs.jl","owner":"iitis","description":"Graphs with vertices labelled with arbitrary objects","archived":false,"fork":false,"pushed_at":"2024-02-01T13:45:52.000Z","size":38,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-18T14:55:49.151Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iitis.png","metadata":{"files":{"readme":"README.md","changelog":"changelog.md","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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-04T12:56:13.000Z","updated_at":"2022-02-20T21:58:12.000Z","dependencies_parsed_at":"2024-02-01T14:53:38.898Z","dependency_job_id":null,"html_url":"https://github.com/iitis/LabelledGraphs.jl","commit_stats":{"total_commits":34,"total_committers":4,"mean_commits":8.5,"dds":0.2941176470588235,"last_synced_commit":"baf5779df6796d3649112321983eee3e41387f6c"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/iitis/LabelledGraphs.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitis%2FLabelledGraphs.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitis%2FLabelledGraphs.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitis%2FLabelledGraphs.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitis%2FLabelledGraphs.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iitis","download_url":"https://codeload.github.com/iitis/LabelledGraphs.jl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iitis%2FLabelledGraphs.jl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261704266,"owners_count":23197139,"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":[],"created_at":"2024-11-16T20:14:35.084Z","updated_at":"2025-06-24T15:37:19.387Z","avatar_url":"https://github.com/iitis.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Coverage Status](https://coveralls.io/repos/github/iitis/LabelledGraphs.jl/badge.svg?branch=kj/initial-implementation)](https://coveralls.io/github/iitis/LabelledGraphs.jl?branch=kj/initial-implementation)\n# LabelledGraphs.jl\n\nGraphs with vertices labelled with arbitrary objects.\n\n## Motivation\n\nGraphs from `LightGraphs` use vertices labelled with contiuous integer range starting from 1.\nThis poses a problem if one wants to handle graphs whose vertices are labelled either by more general integer ranges or other objects (e.g. strings).\n`LabelledGraphs` extend `LightGraphs` by allowing more flexible labelling of verices.\n\n\n## Usage\n\nLabelled graph can be created by providing a sequence of labels, i.e.:\n\n```julia\nusing LabelledGraphs\n\nlg = LabelledGraph([\"a\", \"b\", \"c\"]) # Undirected graph with vertices a, b, c\nldg = LabelledDiGraph([4, 5, 10])   # Directed graph with vertices 4, 5, 10\n```\n\nOne can also create labelled graph backed by a simple graph from `LightGraphs`.\n\n```julia\nusing LabelledGraphs\nusing LightGraphs\n\ng = path_graph(5)\nlg = LabelledGraph([\"a\", \"b\", \"c\", \"d\", \"e\"], g)\n```\n\nOnce the graph is created, it can be used mostly like other graphs rom `LightGraph`.\nAll method operate on labels given during graph's construction, for instance:\n\n```julia\nusing LabelledGraphs\nusing LightGraphs\n\ng = path_digraph(5)\nlg = LabelledGraph([\"a\", \"b\", \"c\", \"d\", \"e\"], g)\n\nprintln(vertices(lg))   # prints [\"a\", \"b\", \"c\", \"d\", \"e\"]\nprintln(edges(lg))      # prints edges \"a\" -\u003e \"b\", \"b\" -\u003e \"c\" etc.\nadd_edge!(lg, \"e\", \"b\")\nprintln(inneighbors(lg, \"b\")) # prints [\"a\", \"e\"]\n```\n\nAdditionally, one can add new vertices to the `LabelledGraph`, either by using `add_vertex!` or `add_vertices!`.\n\n```julia\n\nadd_vertex!(lg, \"f\")\nadd_vertices!(lg, [\"u\", \"v\", \"w\"])\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiitis%2Flabelledgraphs.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiitis%2Flabelledgraphs.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiitis%2Flabelledgraphs.jl/lists"}