{"id":28272201,"url":"https://github.com/bsc-quantic/networks.jl","last_synced_at":"2025-06-25T18:07:29.333Z","repository":{"id":292749222,"uuid":"981808723","full_name":"bsc-quantic/Networks.jl","owner":"bsc-quantic","description":"An alternative graphs library in Julia","archived":false,"fork":false,"pushed_at":"2025-05-27T19:07:03.000Z","size":58,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-27T20:23:48.826Z","etag":null,"topics":["adjacency-matrix","graphs","incidence-matrix","julia","networks"],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bsc-quantic.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-05-11T23:18:08.000Z","updated_at":"2025-05-27T19:06:56.000Z","dependencies_parsed_at":"2025-05-12T00:24:53.253Z","dependency_job_id":"98ed24d2-ac63-4e3f-8277-745b02cd0ae9","html_url":"https://github.com/bsc-quantic/Networks.jl","commit_stats":null,"previous_names":["bsc-quantic/networks.jl"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/bsc-quantic/Networks.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsc-quantic%2FNetworks.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsc-quantic%2FNetworks.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsc-quantic%2FNetworks.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsc-quantic%2FNetworks.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bsc-quantic","download_url":"https://codeload.github.com/bsc-quantic/Networks.jl/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsc-quantic%2FNetworks.jl/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260369389,"owners_count":22998592,"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":["adjacency-matrix","graphs","incidence-matrix","julia","networks"],"created_at":"2025-05-20T19:24:33.414Z","updated_at":"2025-06-25T18:07:29.318Z","avatar_url":"https://github.com/bsc-quantic.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Networks.jl\n\n[![CI](https://github.com/bsc-quantic/Networks.jl/actions/workflows/CI.yml/badge.svg)](https://github.com/bsc-quantic/Networks.jl/actions/workflows/CI.yml)\n[![Documentation: stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://bsc-quantic.github.io/Networks.jl/)\n[![Documentation: dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://bsc-quantic.github.io/Networks.jl/dev/)\n\n\u003e [!WARNING]\n\u003e  Networks.jl is still experimental, and the API can change. \n\nNetworks.jl is a work-in-progress, alternative graph library in Julia. Designed to overcome the limitations of [Graphs.jl](https://github.com/JuliaGraphs/Graphs.jl) when custom graphs, hyperedges, multi-edges, or arbitrary vertex types are needed.\n\n## Motivation\n\nDuring the development of [Tenet.jl](https://github.com/bsc-quantic/Tenet.jl), several requirements arose that are not covered by [Graphs.jl](https://github.com/JuliaGraphs/Graphs.jl):\n\n- Support for hyperedges, open edges, and multi-edges\n- Graph types based on the incidence matrix\n- Automatic method delegation for wrapping graph types, based on [DelegatorTraits.jl](https://github.com/bsc-quantic/DelegatorTraits.jl)\n- Vertices of any type, not just `Integer`s\n- Interfaces that are extensible and better decoupled from concrete implementations\n\n### The Edge entity\n\nOne of the biggest differences between the `AbstractGraph` and `Network` interfaces is that for `Network`, an edge is its own entity; i.e. an edge can be just an identifier like a UUID instead of a relation between two other objects.\n\nThis choice makes a `Network` a more abstract interface than `AbstractGraph`, where the description of a graph is not forced to be based on adjacency matrices.\n\n## Basic Example\n\nLet's start by creating an `IncidentNetwork`, which implements a `Network` using a incidence matrix representation.\nThe first type parameterizes the vertex type, while the second one parameterizes the edge type.\n\n```julia\njulia\u003e g = IncidentNetwork{Symbol, Int}();\n\njulia\u003e vertex_type(g)\nSymbol\n\njulia\u003e edge_type(g)\nInt64\n```\n\nUnlike [Graphs.jl](https://github.com/JuliaGraphs/Graphs.jl), you must explicitly pass the vertex to add it to a network.\n\n```julia\njulia\u003e addvertex!(g, :a);\n\njulia\u003e addvertex!(g, :b);\n\njulia\u003e addvertex!(g, :c);\n\njulia\u003e vertices(g)\nKeySet for a Dict{Symbol, Set{Int64}} with 3 entries. Keys:\n  :a\n  :b\n  :c\n```\n\nEdges are independent entities in an `IncidentNetwork`, so you must add it and then relate it to the vertices.\n\n```julia\njulia\u003e addedge!(g, 1);\n\njulia\u003e edges(g)\nKeySet for a Dict{Int64, Set{Symbol}} with 1 entry. Keys:\n  1\n\njulia\u003e Networks.link!(g, :a, 1);\njulia\u003e Networks.link!(g, :b, 1);\njulia\u003e Networks.link!(g, :c, 1);\n```\n\nIn order to query the vertices connected by an edge, use `edge_incidents`:\n\n```julia\njulia\u003e edge_incidents(g, 1)\nSet{Symbol} with 3 elements:\n  :a\n  :b\n  :c\n```\n\n... and to query the edges connected to a vertex, use `vertex_incidents`:\n\n```julia\njulia\u003e vertex_incidents(g, :a)\nSet{Int64} with 1 element:\n  1\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsc-quantic%2Fnetworks.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbsc-quantic%2Fnetworks.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsc-quantic%2Fnetworks.jl/lists"}