|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Advanced minimum cost flow algorithms. More...
#include <limits>#include <queue>#include <functional>#include <tpl_netcost.H>#include <tpl_dynBinHeap.H>#include <ah-errors.H>Go to the source code of this file.
Classes | |
| struct | Aleph::SSP_Node_Info< Flow_Type > |
| Node info for SSP algorithm. More... | |
| struct | Aleph::Successive_Shortest_Paths< Net > |
| Functor wrapper for SSP algorithm. More... | |
| struct | Aleph::Transshipment_Node_Info< Flow_Type > |
| Node with supply/demand for transshipment problems. More... | |
| struct | Aleph::TransshipmentResult< Flow_Type > |
| Result of transshipment problem. More... | |
| struct | Aleph::AssignmentResult< Cost_Type > |
| Result of assignment problem. More... | |
| struct | Aleph::TransportationResult< Cost_Type > |
| Result of transportation problem. More... | |
| struct | Aleph::MinCostFlowStats< Flow_Type > |
| Statistics for min-cost flow algorithms. More... | |
Namespaces | |
| namespace | Aleph |
| Main namespace for Aleph-w library functions. | |
Functions | |
| template<class Net > | |
| SSP_Node_Info< typename Net::Flow_Type > & | Aleph::ssp_info (typename Net::Node *p) noexcept |
| Access SSP node info. | |
| template<class Net > | |
| Net::Flow_Type | Aleph::reduced_cost (const Net &net, typename Net::Arc *arc, typename Net::Node *from, bool forward) |
| Compute reduced cost of an arc. | |
| template<class Net > | |
| bool | Aleph::ssp_shortest_path (Net &net, typename Net::Node *source, typename Net::Node *sink) |
| Find shortest path using Dijkstra with potentials. | |
| template<class Net > | |
| std::pair< typename Net::Flow_Type, typename Net::Flow_Type > | Aleph::successive_shortest_paths (Net &net) |
| Compute minimum cost maximum flow using Successive Shortest Paths. | |
| template<class Net > | |
| bool | Aleph::ssp_init_potentials (Net &net, typename Net::Node *source) |
| Initialize potentials using Bellman-Ford. | |
| template<class Net , class GetDemand > | |
| TransshipmentResult< typename Net::Flow_Type > | Aleph::solve_transshipment (Net &net, GetDemand get_demand) |
| Solve minimum cost transshipment problem. | |
| template<typename Cost_Type > | |
| AssignmentResult< Cost_Type > | Aleph::solve_assignment (const std::vector< std::vector< Cost_Type > > &costs) |
| Solve the assignment problem using min-cost flow. | |
| template<typename Cost_Type > | |
| TransportationResult< Cost_Type > | Aleph::solve_transportation (const std::vector< Cost_Type > &supplies, const std::vector< Cost_Type > &demands, const std::vector< std::vector< Cost_Type > > &costs) |
| Solve the transportation problem using min-cost flow. | |
| template<class Net > | |
| DynMapTree< typename Net::Arc *, typename Net::Flow_Type > | Aleph::save_flow_solution (const Net &net) |
| Save network simplex solution for warm start. | |
| template<class Net > | |
| void | Aleph::restore_flow_solution (Net &net, const DynMapTree< typename Net::Arc *, typename Net::Flow_Type > &solution) |
| Restore network simplex solution from warm start. | |
Advanced minimum cost flow algorithms.
This file provides additional algorithms for the minimum cost flow problem, complementing the algorithms in tpl_netcost.H.
| Algorithm | Time Complexity | Best Use Case |
|---|---|---|
| Cycle Canceling | O(V*E²*C*U) | Simple implementation |
| Network Simplex | O(n*m*log(n*C)) | General purpose |
| SSP | O(V*U*m*log(V)) | Small flow values |
| Cost Scaling | O(V³*log(V*C)) | Dense, large costs |
Definition in file tpl_mincost.H.