Skip to content

Commit c5cc500

Browse files
committed
Added README.md
1 parent 3a6f50c commit c5cc500

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Elm Graph
2+
3+
A graph data structure library for Elm, inspired by [Haskell Data.Graph](https://hackage.haskell.org/package/containers-0.7/docs/Data-Graph.html). This package implements a finite, directed graph type using an adjacency list representation, where vertices are identified by integers. It also includes an SCC (Strongly Connected Component) type for managing and analyzing strongly-connected components within the graph.
4+
5+
## Getting Started
6+
7+
### Installation
8+
9+
To install the package, run the following:
10+
11+
```bash
12+
elm install guida-lang/graph
13+
```
14+
15+
### Usage
16+
17+
Here’s an example of how to use the `Data.Graph` in Elm:
18+
19+
```elm
20+
import Data.Graph as Graph exposing (Graph)
21+
22+
graphWith3Vertices : Graph
23+
graphWith3Vertices =
24+
let
25+
( graph, nodeFromVertex, vertexFromKey ) =
26+
Graph.graphFromEdges [ ( "a", 'a', [ 'b' ] ), ( "b", 'b', [ 'c' ] ), ( "c", 'c', [] ) ]
27+
in
28+
graph
29+
```
30+
31+
## Documentation
32+
33+
For full API documentation and more examples, please visit the
34+
[Elm package documentation](https://package.elm-lang.org/packages/guida-lang/glsl/1.0.0).
35+
36+
## Contributing
37+
38+
Contributions are welcome! If you have ideas for improvements or find bugs, feel free to open an
39+
issue or submit a pull request.
40+
41+
### To contribute:
42+
43+
1. Fork the repository.
44+
2. Create a new feature branch.
45+
3. Commit your changes.
46+
4. Submit a pull request.

0 commit comments

Comments
 (0)