https://github.com/flowtick/graphs
A simple graph library for Scala
https://github.com/flowtick/graphs
graph graphml scala
Last synced: 6 months ago
JSON representation
A simple graph library for Scala
- Host: GitHub
- URL: https://github.com/flowtick/graphs
- Owner: flowtick
- License: apache-2.0
- Archived: true
- Created: 2018-03-06T08:12:55.000Z (over 7 years ago)
- Default Branch: main
- Last Pushed: 2022-02-05T10:36:58.000Z (over 3 years ago)
- Last Synced: 2024-12-04T20:18:37.032Z (7 months ago)
- Topics: graph, graphml, scala
- Language: Scala
- Homepage: https://flowtick.github.io/graphs
- Size: 4.64 MB
- Stars: 10
- Watchers: 1
- Forks: 4
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://search.maven.org/search?q=g:com.flowtick%20AND%20a:graphs*)
# ℹ️ graphs has moved to https://codeberg.org/unkonstant/graphs under a new license ℹ️
# graphs
`graphs` is a simple [graph](https://en.wikipedia.org/wiki/Graph_theory) library for Scala
# Example
@@snip [SimpleGraphApp.scala](examples/shared/src/main/scala/examples/SimpleGraphExample.scala) { #simple_graph }
# Documentation
Please check the [guide](https://flowtick.github.io/graphs) and the
[API docs](https://flowtick.github.io/graphs/latest/api/com/flowtick/graphs)# Features
* Simple graph creation API
* Depth-first traversal / search
* Breadth-first traversal / search
* Topological sorting
* Dijkstras algorithm for shortest paths
* GraphML import / export (experimental)
* force based layout (planned)
* cross compiled for Scala 2.12, 2.13, Scala.js# Motivation
`graphs` was created to explore different type encoding for graphs and implement well-known algorithms
## Goals
* Support [Scala.js](https://www.scala-js.org)
* Support [GraphML](https://de.wikipedia.org/wiki/GraphML)
* Usages of the library and the core interfaces should be intuitive
* The codebase should follow current idioms and integrate with mainstream libraries for Scala## Non-Goals
* Support all possible graph types / scenarios
* Provide a purely functional library## Alternatives
[Graph for Scala](http://scala-graph.org) is probably the most established graph library for Scala and supports many kinds of graphs
explicitly (custom syntax etc.) with a big variety of algorithms and extensions (json, dot support).Its still being worked on and recently added support for Scala.js. It might have a steeper learning curve but is more
battle-tested and powerful then `graphs`.[quiver](https://github.com/Verizon/quiver) follows [Martin Erwigs Functions Graph Library](http://web.engr.oregonstate.edu/~erwig/fgl/haskell)
and appears to be more or less abandoned. Its less focused on algorithms but provides a more functional perspective
on graphs.`graphs` is inspired and influenced by both libraries. Please check them out to see if they fit your use case
and preferences better.
# Licensegraphs is published under the terms of the Apache 2.0 License. See the [LICENSE](LICENSE) file.