From ad562c661405a5634e809184c9f4fa0acf5113c1 Mon Sep 17 00:00:00 2001 From: Miles Date: Tue, 28 May 2024 16:45:10 -0400 Subject: [PATCH 1/3] README edits --- README.md | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/README.md b/README.md index f08b0e1..4a7be4c 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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: From 4580a304b5de98c59010b272ebce59fef0d01f24 Mon Sep 17 00:00:00 2001 From: Miles Date: Tue, 28 May 2024 16:55:51 -0400 Subject: [PATCH 2/3] Update examples/README.jl and regenerate README.md --- README.md | 21 ++++++++++++++++++++- examples/README.jl | 2 +- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 4a7be4c..da024e2 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,43 @@ # 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 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. + + +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). The vertex names can be strings, tuples of integers, or other unique identifiers. The vertex names can be 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 @@ -75,12 +91,15 @@ 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: diff --git a/examples/README.jl b/examples/README.jl index a0a7596..76b7dd6 100644 --- a/examples/README.jl +++ b/examples/README.jl @@ -15,7 +15,7 @@ #' ## 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). The vertex names can be strings, tuples of integers, or other unique identifiers. The vertex names can be 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`. From c0ba8998c73c156dd3693bf2d4153f515586e08c Mon Sep 17 00:00:00 2001 From: Miles Date: Tue, 28 May 2024 17:30:47 -0400 Subject: [PATCH 3/3] Remove duplicate sentence --- README.md | 2 +- examples/README.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index da024e2..80f4a88 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ julia> ] add NamedGraphs -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). The vertex names can be strings, tuples of integers, or other unique identifiers. The vertex names can be strings, tuples of integers, or other unique identifiers. +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). The vertex names can be strings, tuples of integers, or other unique identifiers (anything that is hashable). diff --git a/examples/README.jl b/examples/README.jl index 76b7dd6..b9e49ae 100644 --- a/examples/README.jl +++ b/examples/README.jl @@ -15,7 +15,7 @@ #' ## Introduction -#' 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). The vertex names can be strings, tuples of integers, or other unique identifiers. The vertex names can be strings, tuples of integers, or other unique identifiers. +#' 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). The vertex names can be strings, tuples of integers, or other unique identifiers (anything that is hashable). #' There is a supertype `AbstractNamedGraph` that defines an interface and fallback implementations of standard #' Graphs.jl operations, and two implementations: `NamedGraph` and `NamedDiGraph`.