Corrected the cost
This project implements the Hungarian method solver.
It can handle not balanced cost matrix and is prepared for minimization and maximization.
You can use the Swift Package Manager to install HungarianSolver by adding the proper description to your Package.swift file:
import PackageDescription let package = Package( name: "YOUR_PROJECT_NAME", targets: [], dependencies: [ .package(url: "https://github.com/Jasagredo/Hume.git", from: "0.0.5"), ] )
Once the Hume class is imported, just declare a solver and ask for a solution. The algorithm runs in O(n^4).
var h = HunSolver(matrix: mat) print(h.solve())
HungarianSolver is under MIT license. Check LICENSE for more details.
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
Hume
This project implements the Hungarian method solver.
It can handle not balanced cost matrix and is prepared for minimization and maximization.
Installation
You can use the Swift Package Manager to install HungarianSolver by adding the proper description to your Package.swift file:
Usage
Once the Hume class is imported, just declare a solver and ask for a solution. The algorithm runs in O(n^4).
License
HungarianSolver is under MIT license. Check LICENSE for more details.