Download

The latest stable releases are

Module Scala 2.13 Scala.js 2.13 Scala 3 Scala.js 3 Scala Native 3
graph-core 2.0.2 2.0.2 2.0.2 2.0.2 2.0.2
graph-dot 2.0.0 2.0.0 2.0.0 2.0.0 2.0.0
graph-json 2.0.0 2.0.0 - - -

To download the latest Scala release of core, add the following to your SBT settings:

libraryDependencies += "org.scala-graph" %% "graph-core" % "2.0.2"

You may find or manually download any release including Scaladoc from org.scala-graph on Maven.

Major release 1 is deprecated except for bug fixes.

2.0 Release notes

2.0.2

  • core and dot are now cross-compiled against Scala 2.13 and Scala 3. The json module is not ready for Scala 3 due to a dependency that is not available for Scala 3. Graph for Scala is now published for the platforms Scala, Scala.js and Scala Native.

2.0.1

2.0.0

2.0 introduces some significant enhancements over 1.x:

  • new: Easier custom edge creation facilitated by a string of traits.
  • new: Easy definition of edge ADTs.
  • new: Support for graph transformations via map and flatMap.
  • new: Directed hyperedges come with multiple sources.
  • new: Directed and undirected hyperedges have now type safe signatures.
  • modified: The type parameter E for the edge type of graphs is now a simple type as opposed to a higher kinded type as before.
  • modified: Edge types are modularized by packages and traits for easier custom edge definitions.
  • dropped: Generic labelled edges are superseded by custom edges.

Migration notes

Unfortunately, the enhancements could only be achieved at the expense of backwards compatibility. To make this clear, we bumped the major version to 2.

Take your time to familiarise yourself with the new concepts and then start to migrate your code by choosing the most appropriate edge types. For missing pieces, please refer to ScalaDoc and the numerous tests.

1.13 Release notes

1.13.6

1.13.5

  • Test scope for Netbeans dependencies.

1.13.4

  • Ready for use with Scala 3.1.
  • Fixed Scala 3 compatiblity issue.

1.13.2

  • Completed migration to Scala 2.13 by releasing the last missing part Graph Constrained. Again, many thanks to Marcus.
  • Fixed minor performance regression in the Scala 2.13 release of Core.

1.13.1

  • Fixed Scala 2.13 regression when using implicit conversion to call edge methods on inner edges.

1.13.0

  • Refactored constraint violation handling in the constrained module. Instead of implementing error handlers, you may now call specific methods that inform you whether an operation was accepted or rejected. Grab the updated Constrained Guide to learn more. Many thanks go to Mario for his continuous support on the test side and his advice on true usability of the improved design.
  • Renamed def -?(node: N) to def minusIsolated(node: N) because def -? has been added to the constrained module with another semantic.
  • The methods minusIsolated and -!, --! are now deprecated. This is meaningful because they add little value while increase code complexity.
  • Added Scala 2.13 support. Many thanks to Marcus who is doing a great job migrating the code base.

1.12 Release notes

1.12.7

  • fix in module constrained: += and ++= could fail to restore the exact original graph after some postCheck failure.

1.12.6

  • fix in module constrained: Checks were not always suspended internally when handling postCheck failures.

1.12.5

  • new: Added findCycleContaining(node: NodeT) respectively node.partOfCycle to support finding cycles that contain a specific node in any kind of graph.
  • fix: Topological sort could erroneously report a cycle when combined with edge filtering achieved by withSubgraph. Closes #104

1.12.4

  • mod: Ensured that DFS ordering is always lexicographic.

1.12.3

1.12.1

  • mod: Edge weight is now of the type Double.

1.12.0

1.11 Release notes

1.11.5

  • fix: topologicalSort of a cyclic graph could leave cycle undetected. Closes #68.
  • fix: on DOT export, non-empty child subgraphs of an empty subgraph did not render. Closes #69.

1.11.4

  • new: Added method toOuter to inner nodes as a synonym for value.
  • new: released graph-core and all accompanying modules for Scala 2.12.

1.11.3

  • mod: An opposite traversal direction will now be rejected at run time by IllegalArgumentException on any method call returning a Cycle or Path in reaction to #62.
  • fix: For a non-existing topological order, an empty order could be returned instead of a node on the cycle as reported in #61.
  • mod: The Scalacheck dependency has been degraded to "optional;provided" to meet a request on the user list.

1.11.2

  • new: Added withMaxDepth and withMaxWeight support to shortestPathTo meeting #50

1.11.1

1.11.0

  • mod: Java serialization has been customized for more efficiency. Due to the Scala issue on @transient there is a constant footprint of approximately 4 kb, though. Please vote for this issue if you feel bothered.
  • fix: In case of possibly mixed graphs, isDirected, isHyper and isMulti now also consider the graph content as opposed to solely checking the edge type parameter. This is achieved O(1) except for isMulti.
  • fix #57: issue with componentTraverser
  • mod: The node type parameter of edge types is now covariant thus honoring algebraic data types on edges. This meets #40.

1.10 Release notes

1.10.1

  • new: Added withMaxWeight as a fluent property. withMaxWeight is implemented for BreadthFirst, DepthFirst and findCycle.
  • fix #54: Removing an edge in a mutable graph could cause erroneous diSuccessors.

1.10.0

  • new: Added topological sortingin several flavors. topologicalSort is now integrated in the Traverser framework allowing for fluent properties. Among others, TopologicalOrder, the result of a topological sort, may be viewed and ordered layer by layer.
  • new: Directed or undirected hyperedge endpoints may now be of either Bag or Sequence collection kind.
  • mod: Dependency on scala-reflect has been dropped.
  • mod: Module Graph-test is now integrated in Graph-core.
  • fix #34: No more racing condition occurs when running traversals under stress such as 100000 in parallel.
  • fix #38: Under a rare condition, JSON output was invalid.
  • fix #47: DiHyperEdge's target nodes now allow for duplicate nodes by default.
  • fix #51: Constructing EqHashSetIterator is now O(1).
  • mod: Added type-safe support for DOT ID and DOT node_id that were covered by String previously.
  • new: Added DOT record shape support - see also the test method def `Colons (':') in node_id's are handled correctly` in TExport.scala.

Migration notes:

  • Signatures for the DOT export have changed slightly: Since the previous representation of DOT ID and DOT node_id by String has been replaced by the case classes Id respectively NodeId user code needs to be updated. For this purpose you either invoke these constructors explicitly or you import scalax.collection.io.dot.implicits._ to utilize implicit conversions.
  • Also, DotRootGraph and DotSubGraph have an additional parameter attrStmts while kvList has been renamed to attrList.

1.9 Release notes

1.9.4

  • fix: Java serialization fix in 1.9.3 was not correct.

1.9.3

  • fix: issues #24, #36, #39 including Java serialization.

1.9.2

  • mod: JSON export creates now single node/edge sections subsuming all class types.
  • fix: issue with node neighbors in mixed graphs.

1.9.1

  • fix: equality of non-basic directed hyperedges did no more work correctly since 1.7.1.
  • fix: equality of hyperedges with one or more hooks did not work correctly.

1.9.0

  • new: WalkBuilder and PathBuilder allow to create walks and paths in terms of the underlying graph.
  • new: DOT-Export allows to map hyperedges to a sequence of DOT edge statements.
  • mod: Members marked deprecated in 1.8.0 have been removed. Visitors no more return Continue or Cancel.
  • mod: Traversing has been optimized for speed and refactored for better modularity.
  • mod: Scala 2.11 jars are now compiled with Scala 2.11.1 following the recommendation of the Scala core team.

1.8 Release notes

1.8.1

  • new: Scala 2.11 releases excluding graph-json.
  • new: module Test to facilitate random graph generation.
  • new: Parameter weight added to overloaded version of shortestPathTo to enable flexible weight definitions.
  • new: Parameter orderHint added to GraphConfig.
  • mod: Factory method fromStream removed.
  • And some fixes.

1.8.0

  • new: Traversing API taken to the next level.
  • mod: Some conversion methods and rarely used classes have been renamed for clarity and uniformity.

Migration notes:

  • Please replace deprecated method calls in a timely manner since deprecated methods will be removed from the library probably as soon as in April 2014. Besides reading the updated User Guide it should be worthwhile to inspect TTraversal.scala near the bottom of test migration changes providing a handful of migration examples.
  • Please update your code base with the following renamed methods and classes:

    up to 1.7 as of 1.8 renamed to
    toEdgeIn, toNodeInSet, toEdgeInSet toOuter
    NodeIn, EdgeIn OuterNode, OuterEdge
    NodeOut, EdgeOut InnerNodeParam, InnerEdgeParam
    InnerNodeLike, InnerEdgeLike InnerNode, InnerEdge
    with the common base InnerElem
    GraphParam* *Param

1.7 Release notes

1.7.3

  • mod: faster processing of direct successors, O(1) access for findOutgoingTo.
  • mod: Manifest migrated to TypeTag. Manifest maintained in Graph_json because of lift.json.
  • mod: Compiler dependency updated to 2.10.3.
  • fix: method upsert didn't work properly in case of insertions.

1.7.2

  • new: method upsert for mutable graphs.
  • fix: due to a regression introduced in 1.7.1 findOutgoingTo and findIncomingFrom didn't work correctly.

1.7.1

  • mod: Several node-level methods and equals/hashCode for edges have been optimized.
  • fix: shortestPathTo GitHub issue #12.
  • fix: method draw.
  • fix: builder pattern imposed by GraphCanBuildFrom.

1.7.0

  • new: Edge extractors have been added/modified. Latter may require user-site source code changes in edge patterns. See Inspecting Endpoints and More Edge Patterns.
  • mod: SBT upgraded to 0.13.0.