- This is an API breaking change due to addEdge() changes
- addEdge(_ e: E, directed: Bool) deprecated in favor of just addEdge(_ e: E) since Edge already has a directed property (@Vithanco)
- Fix generic parameter name shadowing for Swift 6 compatibility
- Count paths between vertices (@sbeitzel)
- Improve performance of detectCycles() (@automaciej)
- Indegree and Outdegree methods (@TizianoCoroneo)
- Reverse a graph with
reversed()(@mattpaletta) - Performance improvement to
topologicalSort()(@dabbott) - Recursive initializers for
UniqueElementsGraph(@ferranpujolcamins) - A few
letvsvarwarnings fixed
- This is an API breaking refactor
- This version requires Swift 5.0 (Xcode 10.2)
Graphno longer conforms toclassso structs can beGraphs (@davecom)GraphandEdgeare nowCodablemeaning all implementations must be as well including all vertex types, leading to the removal ofCodableUnweightedGraphandCodableWeightedGraph, 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
UniqueElementsGraphtests (@ferranpujolcamins) - Refactor many aspects of
UnweightedGraphandWeightedGraphinto conditional conformance extensions toGraphand new protocols (@ferranpujolcamins) - Add new performance tests (@ferranpujolcamins)
- Add direction back to
Edge(@ferranpujolcamins)
- This is an API breaking refactor
- This version requires Swift 4.2 (Xcode 10.1)
Graphis now a protocol instead of a classedgesToVertices()is now a method onGraphinstead of a free function- The
Edgeprotocol has been significantly simplifieid UnweightedEdgeandWeightedEdgeare nowCodable- Subclasses of
GraphCodableUnweightedGraphandCodableWeightedGraphprovide serialization support to JSON and anything elseCodablesupports (thanks for the help, @yoiang) - Experimental subclass of
UnweightedGraph,UniqueElementsGraphprovides a union operation and guarantees no duplicate vertices & edges in a graph (thanks @ferranpujolcamins) - Cycle detector method that returns edges (thanks @ZevEisenberg)
- Project reorganized to support testing on Linux, just run
swift test Package.swiftupdated for Swift 4 package management style- Added
detectCyles()which uses the Liu/Wang algorithm for detecting cycles up to any length in a graph - Added a couple unit tests for testing
detectCycles()
- Upgraded to Swift 4
- Project now built with Xcode 9
- SwiftPriorityQueue replaced with newer version
- Fixed a bug in
removeAllEdges()and added a test for it
- Added a Minimum Spanning Tree Fuction
mst()based on Jarnik's Algorithm (aka Prim's Algorithm) - Simplified Dijkstra's Algorithm implementation
- Fixes a bug that could result in the wrong edges being removed when a vertex is removed (thanks @brandonroth)
- Silences some warnings about printing optionals introduced in Swift 3.1
- Carthage Support (via re-organizing into framework) - thanks @klundberg
- New search methods added - versions of
bfs()anddfs()that support custom goal functions findAll()added as a version ofbfs()with multiple potential outcomes- watchOS support added to Podfile
- Moved search functions from free functions to extensions of
GraphandWeightedGraph - Switched license to Apache 2.0 from MIT
- Added
topologicalSort()andisDAG - Changed access level for most types to
open - Added unit tests for topologicalSort and isDAG
- Fixes for the final version of Swift 3
- Updated version of SwiftPriorityQueue
- Added .swift-version file
- Requires Swift 3
- Minor breaking API naming changes in-line with Swift 3 expectations
dijkstra()has a parameter for the starting distance to the root vertex (typically zero)- Updated the included SwiftPriorityQueue source file
- Last version to support Swift 2
- Switched
dijkstra()to use a priority queue - Included the source file for SwiftPriorityQueue in the project
- Fixed build issues on Xcode 7.3
- Fixed Swift 3 deprecations
- Added SPM support
- Separated SwiftGraph into multiple files
- Fixed some documentation.
- Made
edgesandverticesinternal instead of private
Fixed the misspelling of Dijkstra
Updated to support Swift 2
Initial Stable Release - last release with Swift 1.2 support