graphs is a simple graph library for Scala
import com.flowtick.graphs._ import com.flowtick.graphs.defaults._ val graph: Graph[Unit, String] = Graph.fromEdges(Set( "A" --> "B", "B" --> "C", "D" --> "A")) println(graph.edges)
- 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
graphs was created to explore different type encoding for graphs and implement well-known algorithms
- Support Scala.js
- Support 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
- Support all possible graph types / scenarios
- Provide a purely functional library
Graph for Scala 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 is inspired and influenced by both libraries. Please check them out to see if they fit your use case and preferences better.
graphs is published under the terms of the Apache 2.0 License. See the LICENSE file.