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.
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 introduces some significant enhancements over 1.x:
map
and flatMap
.
E
for the edge type of graphs is now a simple type
as opposed to a higher kinded type as before.
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.
Either
has also changed.
Graph Constrained
.
Again, many thanks to Marcus.
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.
def -?(node: N)
to def minusIsolated(node: N)
because def -?
has been added to the constrained module with another semantic.
minusIsolated
and -!
, --!
are now deprecated.
This is meaningful because they add little value while increase code complexity.
postCheck
failure.
postCheck
failures.
findCycleContaining(node: NodeT)
respectively node.partOfCycle
to support finding cycles that contain a specific node in any kind of graph.
withSubgraph
.
Closes #104
weight
is now of the type Double
.
topologicalSort
of a cyclic graph could leave cycle undetected.
Closes #68.
toOuter
to inner nodes as a synonym for value
.
IllegalArgumentException
on any method call returning a Cycle or Path in reaction to
#62.
"optional;provided"
to meet a request on the user list.
withMaxDepth
and withMaxWeight
support to shortestPathTo
meeting #50
org.scala-graph
.
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
.
withMaxWeight
is implemented for BreadthFirst, DepthFirst and findCycle.
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.
Bag
or Sequence
collection kind.
scala-reflect
has been dropped.
Graph-test
is now integrated in Graph-core
.
DiHyperEdge
's target nodes now allow for duplicate nodes by default.
EqHashSetIterator
is now O(1).
ID
and DOT node_id
that were covered by String
previously.
def `Colons (':') in node_id's are handled correctly`
in
TExport.scala.
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.
DotRootGraph
and DotSubGraph
have an additional parameter
attrStmts
while kvList
has been renamed to attrList
.
WalkBuilder
and
PathBuilder
allow to create walks and paths in terms
of the underlying graph.
Continue
or Cancel
.
weight
added to overloaded version of
shortestPathTo
to enable flexible weight definitions.
orderHint
added to GraphConfig
.
fromStream
removed.
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 |
findOutgoingTo
.
Manifest
migrated to TypeTag
.
Manifest
maintained in Graph_json
because of
lift.json
.
2.10.3
.
upsert
didn't work properly in case of insertions.
upsert
for mutable graphs.findOutgoingTo
and
findIncomingFrom
didn't work correctly.
equals/hashCode
for edges have been optimized.
shortestPathTo
GitHub issue #12.draw
.GraphCanBuildFrom
.