Skip to content

Commit

Permalink
README edits
Browse files Browse the repository at this point in the history
  • Loading branch information
emstoudenmire committed May 28, 2024
1 parent 0feb539 commit ad562c6
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,27 @@
# NamedGraphs



[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://mtfishman.github.io/NamedGraphs.jl/stable)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://mtfishman.github.io/NamedGraphs.jl/dev)
[![Build Status](https://github.com/mtfishman/NamedGraphs.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/mtfishman/NamedGraphs.jl/actions/workflows/CI.yml?query=branch%3Amain)
[![Coverage](https://codecov.io/gh/mtfishman/NamedGraphs.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/mtfishman/NamedGraphs.jl)
[![Code Style: Blue](https://img.shields.io/badge/code%20style-blue-4495d1.svg)](https://github.com/invenia/BlueStyle)



## Installation



You can install the package using Julia's package manager:
```julia
julia> ] add NamedGraphs
```



## Introduction



This packages introduces graph types with named edges, which are built on top of the `Graph`/`SimpleGraph` type in the [Graphs.jl](https://github.com/JuliaGraphs/Graphs.jl) package that only have contiguous integer edges (i.e. linear indexing).


This packages introduces graph types with named vertices, which are built on top of the `Graph`/`SimpleGraph` type in the [Graphs.jl](https://github.com/JuliaGraphs/Graphs.jl) package that only have contiguous integer vertices (i.e. linear indexing). By named verticse, one means that the vertices can be labelled by strings, tuples of integers, or other unique identifiers.

There is a supertype `AbstractNamedGraph` that defines an interface and fallback implementations of standard
Graphs.jl operations, and two implementations: `NamedGraph` and `NamedDiGraph`.



## `NamedGraph`



`NamedGraph` simply takes a set of names for the vertices of the graph. For example:

```julia
Expand Down Expand Up @@ -91,15 +75,12 @@ and 1 edge(s):

```


Internally, this type wraps a `SimpleGraph`, and stores a `Dictionary` from the [Dictionaries.jl](https://github.com/andyferris/Dictionaries.jl) package that maps the vertex names to the linear indices of the underlying `SimpleGraph`.



Graph operations are implemented by mapping back and forth between the generalized named vertices and the linear index vertices of the `SimpleGraph`.



It is natural to use tuples of integers as the names for the vertices of graphs with grid connectivities.
For example:

Expand Down

0 comments on commit ad562c6

Please sign in to comment.