#include <rm3_flow_dire_graph.h>
NOTE: all the above mathematical functions are considered integral (that is with integer values only)
Definition at line 128 of file rm3_flow_dire_graph.h.
flow_dire_graph::flow_dire_graph | ( | ) |
Empty constructor.
flow_dire_graph::~flow_dire_graph | ( | ) |
Destructor.
flow_dire_graph::flow_dire_graph | ( | const undi_graph & | ) |
Constructor from the undi_graph class. PRECONDITIONS: all undi_graph-edges must be directed
flow_dire_graph::flow_dire_graph | ( | const dire_graph & | ) |
Constructor from the dire_graph class.
flow_dire_graph::flow_dire_graph | ( | const flow_dire_graph & | ) |
Copy constructor.
flow_dire_graph& flow_dire_graph::operator= | ( | const undi_graph & | ) |
Equality operator from the undi_graph. PRECONDITIONS: all undi_graph-edges must be directed
Reimplemented from dire_graph.
flow_dire_graph& flow_dire_graph::operator= | ( | const dire_graph & | ) |
Equality operator from the dire_graph.
flow_dire_graph& flow_dire_graph::operator= | ( | const flow_dire_graph & | ) |
Copy equality operator.
void flow_dire_graph::local_get | ( | gdt::gdtnode_map< struct_flow_dire_node_info > *& | p1, | |
gdt::gdtedge_map< struct_flow_dire_edge_info > *& | p2 | |||
) |
Get all private variables.
int flow_dire_graph::flow_cost | ( | ) | const |
Return the cost of the flow.
Return the difference from out_flow and in_flow of gdtnode.
bool flow_dire_graph::balance_is_consistent | ( | ) | const |
Return false if some balance properties are violated.
bool flow_dire_graph::flow_is_consistent | ( | gdtedge | e | ) | const |
Return false if the property
lower_cap(e) <= flow(e) <= upper_cap(e)
is violated on given gdtedge.
bool flow_dire_graph::flow_is_consistent | ( | gdtnode | v | ) |
Return false if the property
Sum_v[flow(v,w)] - Sum_u[flow(u,v)] = balance(v)
is violated on given gdtnode.
bool flow_dire_graph::flow_is_consistent | ( | ) |
Return return false if either:
bool flow_dire_graph::is_consistent | ( | ) |
Return false if some flow network properties are violated.
void flow_dire_graph::clear | ( | ) |
Delete all nodes and edges.
Reimplemented from dire_graph.
Set the upper capacity of gdtedge with int.
Set the lower capacity of gdtedge with int.
Set upper cap., lower cap., cost and flow of gdtedge with the int values specified in this order.
void flow_dire_graph::steal_from | ( | dire_graph & | dg | ) |
Make *this with the dire_graph dg internal variables and cut these variables from dg. This method is used to make a dire_graph as a flow_dire_graph, manteining the same internal variables. WARNING: dg has an empty body after this method is applied
void flow_dire_graph::mirror | ( | flow_dire_graph & | fdg | ) |
Copy all private variables of flow_dire_graph in *this.
void flow_dire_graph::forget | ( | ) |
Cut all private variables in *this.
Reimplemented from undi_graph.
bool flow_dire_graph::min_cost_flow | ( | ) |
Compute a min cost flow on the network. Return false if a fesible flow does not exist. PRECONDITIONS: current implementation only works for nonnegative costs.