- 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)
- This is an API breaking refactor
- This version requires Swift 4.2 (Xcode 10.1)
Graph
is now a protocol instead of a classedgesToVertices()
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)
- Project reorganized to support testing on Linux, just run
swift test
Package.swift
updated 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
Graph
andWeightedGraph
- 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
edges
andvertices
internal instead of private
Fixed the misspelling of Dijkstra
Updated to support Swift 2
Initial Stable Release - last release with Swift 1.2 support