SwiftGraph v3.0.0 Release Notes
Release Date: 2019-04-12 // almost 4 years ago-
- ๐จ This is an API breaking refactor
- This version requires Swift 5.0 (Xcode 10.2)
Graph
no longer conforms toclass
so structs can beGraph
s (@davecom)Graph
andEdge
are nowCodable
meaning all implementations must be as well including all vertex types, leading to the removal ofCodableUnweightedGraph
andCodableWeightedGraph
, which are now unnecessary (@davecom)- ๐ New CONTRIBUTORS.md file containing some history (@davecom)
- ๐ New search traversal methods (@ferranpujolcamins)
- ๐ Improvements to
UniqueElementsGraph
(@ferranpujolcamins) - โ Useful constructors for testing (@ferranpujolcamins)
- ๐ Improvements to
UniqueElementsGraph
tests (@ferranpujolcamins) - ๐จ Refactor many aspects of
UnweightedGraph
andWeightedGraph
into conditional conformance extensions toGraph
and new protocols (@ferranpujolcamins) - โ Add new performance tests (@ferranpujolcamins)
- โ Add direction back to
Edge
(@ferranpujolcamins)
Previous changes from v2.0.0
-
- ๐จ This is an API breaking refactor
- This version requires Swift 4.2 (Xcode 10.1)
Graph
is now a protocol instead of a class- ๐
edgesToVertices()
is now a method onGraph
instead of a free function - The
Edge
protocol has been significantly simplifieid UnweightedEdge
andWeightedEdge
are nowCodable
- ๐ Subclasses of
Graph
CodableUnweightedGraph
andCodableWeightedGraph
provide serialization support to JSON and anything elseCodable
supports (thanks for the help, @yoiang) - Experimental subclass of
UnweightedGraph
,UniqueElementsGraph
provides a union operation and guarantees no duplicate vertices & edges in a graph (thanks @ferranpujolcamins) - Cycle detector method that returns edges (thanks @ZevEisenberg)