44 #ifndef NETWORK_FLOW_HPP 45 #define NETWORK_FLOW_HPP 53 #define I2S(number) std::to_string(number) 62 using kind = boost::vertex_property_tag;
67 using kind = boost::vertex_property_tag;
72 using kind = boost::vertex_property_tag;
77 using kind = boost::vertex_property_tag;
82 using kind = boost::vertex_property_tag;
87 using kind = boost::vertex_property_tag;
92 using kind = boost::vertex_property_tag;
99 using kind = boost::edge_property_tag;
104 using kind = boost::edge_property_tag;
109 using kind = boost::edge_property_tag;
114 using kind = boost::edge_property_tag;
119 using kind = boost::edge_property_tag;
124 using kind = boost::edge_property_tag;
129 using kind = boost::edge_property_tag;
155 boost::property<nf_residual_capacity_t, double, edge_nf_pseudo_flow_property>;
168 boost::adjacency_list<boost::vecS, boost::vecS, boost::bidirectionalS, vertex_nf_property, edge_nf_property>;
266 bool print_graph(
const char* file_name =
"network_flow.dot");
270 std::pair<network_flow_graph_type::vertex_descriptor, network_flow_graph_type::vertex_descriptor>;
306 network_flow_graph_type::vertex_descriptor
target,
307 std::vector<network_flow_graph_type::edge_descriptor>*
P);
pmap_nf_index_t p_nf_index
boost::property_map< network_flow_graph_type, nf_capacity_t >::type pmap_nf_capacity_t
boost::property< nf_potential_t, double, vertex_nf_imbalance_property > vertex_nf_potential_property
boost::vertex_property_tag kind
boost::property_map< network_flow_graph_type, nf_reduced_cost_t >::type pmap_nf_reduced_cost_t
boost::property< nf_name_t, std::string, vertex_nf_index_property > vertex_nf_property
pmap_nf_imbalance_t p_nf_imbalance
boost::property< nf_imbalance_t, double, vertex_nf_balance_property > vertex_nf_imbalance_property
boost::property< nf_edge_description_t, std::string > edge_nf_description_property
edge properties
Class specification of the graph structures.
boost::property< nf_capacity_t, double, edge_nf_flow_property > edge_nf_capacity_property
pmap_nf_edge_description_t p_nf_edge_description
Edge maps variables.
boost::property_map< network_flow_graph_type, nf_edge_description_t >::type pmap_nf_edge_description_t
edge maps
std::string get_vertex_description(network_flow_graph_type::vertex_descriptor vd)
Generates the description string of the vertex vd.
boost::edge_property_tag kind
std::string get_edge_description(network_flow_graph_type::edge_descriptor ed)
Generates the description string of the edge ed.
boost::edge_property_tag kind
~network_flow()=default
Destructor of the class.
bool successive_shortest_path_algorithm()
Computes the solution for the min cost flow problem with successive shortest path algorithm...
network_flow_graph_type network_flow_graph
Network flow graph pointer.
boost::property_map< network_flow_graph_type, nf_distance_t >::type pmap_nf_distance_t
network_flow(int _debug_level)
Constructor of the class.
pmap_nf_potential_t p_nf_potential
pmap_nf_pseudo_flow_t p_nf_pseudo_flow
boost::property< nf_vertex_description_t, std::string > vertex_nf_description_property
vertex properties
void update_vertex_imbalance(network_flow_graph_type::vertex_descriptor vd)
Updates the vertex imbalance.
boost::property_map< network_flow_graph_type, nf_pseudo_flow_t >::type pmap_nf_pseudo_flow_t
boost::property_map< network_flow_graph_type, nf_vertex_description_t >::type pmap_nf_vertex_description_t
vertex maps
boost::property_map< network_flow_graph_type, nf_index_t >::type pmap_nf_index_t
boost::edge_property_tag kind
boost::property< nf_index_t, unsigned long, vertex_nf_distance_property > vertex_nf_index_property
void generic_label_correcting_algorithm(network_flow_graph_type::vertex_descriptor source, network_flow_graph_type::vertex_descriptor target, std::vector< network_flow_graph_type::edge_descriptor > *P)
Implements the generic label correcting algorithm for vertex distances labelling. ...
redefinition of set to manage ordered/unordered structures
boost::edge_property_tag kind
boost::property< nf_balance_t, double, vertex_nf_description_property > vertex_nf_balance_property
boost::vertex_property_tag kind
boost::property_map< network_flow_graph_type, nf_name_t >::type pmap_nf_name_t
pmap_nf_residual_capacity_t p_nf_residual_capacity
boost::property_map< network_flow_graph_type, nf_flow_t >::type pmap_nf_flow_t
boost::vertex_property_tag kind
boost::property_map< network_flow_graph_type, nf_potential_t >::type pmap_nf_potential_t
Template definition of refcount.
boost::edge_property_tag kind
boost::property< nf_flow_t, double, edge_nf_reduced_cost_property > edge_nf_flow_property
boost::property< nf_pseudo_flow_t, double, edge_nf_description_property > edge_nf_pseudo_flow_property
pmap_nf_vertex_description_t p_nf_vertex_description
Vertex maps variables.
boost::edge_property_tag kind
boost::vertex_property_tag kind
boost::adjacency_list< boost::vecS, boost::vecS, boost::bidirectionalS, vertex_nf_property, edge_nf_property > network_flow_graph_type
definition of the Network Flow Graph
boost::property_map< network_flow_graph_type, nf_residual_capacity_t >::type pmap_nf_residual_capacity_t
Template borrowed from the ANTLR library by Terence Parr (http://www.jGuru.com - Software rights: htt...
boost::vertex_property_tag kind
boost::vertex_property_tag kind
boost::edge_property_tag kind
pmap_nf_reduced_cost_t p_nf_reduced_cost
bool print_graph(const char *file_name="network_flow.dot")
Prints a textual description of the graph in a .dot file format.
boost::property< nf_reduced_cost_t, double, edge_nf_residual_capacity_property > edge_nf_reduced_cost_property
pmap_nf_balance_t p_nf_balance
boost::property< nf_residual_capacity_t, double, edge_nf_pseudo_flow_property > edge_nf_residual_capacity_property
boost::property_map< network_flow_graph_type, nf_imbalance_t >::type pmap_nf_imbalance_t
void clear_results()
Clears results of a previous computation.
pmap_nf_capacity_t p_nf_capacity
boost::property< nf_cost_t, double, edge_nf_capacity_property > edge_nf_property
boost::property_map< network_flow_graph_type, nf_cost_t >::type pmap_nf_cost_t
boost::vertex_property_tag kind
boost::property< nf_distance_t, double, vertex_nf_potential_property > vertex_nf_distance_property
pmap_nf_distance_t p_nf_distance
std::pair< network_flow_graph_type::vertex_descriptor, network_flow_graph_type::vertex_descriptor > vertex_pair
CustomOrderedSet< vertex_pair > inserted_edges
boost::property_map< network_flow_graph_type, nf_balance_t >::type pmap_nf_balance_t