1 # ifndef TPL_NETCAPGRAPH_H
2 # define TPL_NETCAPGRAPH_H
3 # include <tpl_netgraph.H>
14 template <
typename Node_Info,
typename F_Type =
double>
28 :
Net_Node<Node_Info, F_Type>(node_info),
35 :
Net_Node<Node_Info, F_Type>(*node), max_cap(node->max_cap) { }
61 template <
class NodeT,
class ArcT>
89 const Flow_Type & cap = numeric_limits<Flow_Type>::max())
140 throw std::domain_error(
"aux_net has already computed");
146 Node * p = it.get_current();
150 aux_net->
insert_arc(src, tgt,
true, p->max_cap, 0);
156 Arc * arc = it.get_current();
162 aux_net->
insert_arc(aux_net->get_tgt_node(src_arc),
163 aux_net->get_src_node(tgt_arc),
false,
164 arc->cap, arc->flow);
192 throw std::domain_error(
"Auxiliar net has not been generated");
195 it.has_current(); it.next())
201 p->in_flow = p->out_flow = arc->flow;
215 throw std::domain_error(
"Auxiliar net has not been generated");
Node * insert_node(const Node_Type &node_info, const Flow_Type &cap=numeric_limits< Flow_Type >::max())
Definition: tpl_netcapgraph.H:88
virtual Arc * insert_arc(Node *src_node, Node *tgt_node, const typename Arc::Arc_Type &arc_info, const Flow_Type &cap, const Flow_Type &flow)
Definition: tpl_netgraph.H:517
Net_Cap_Node(const Node_Info &node_info)
Definition: tpl_netcapgraph.H:27
Definition: tpl_netgraph.H:66
#define NODE_COOKIE(p)
Definition: aleph-graph.H:248
Definition: tpl_netcapgraph.H:15
Definition: tpl_netcapgraph.H:62
void free_aux_net()
Definition: tpl_netcapgraph.H:212
F_Type Flow_Type
Tipo que representa el flujo.
Definition: tpl_netcapgraph.H:19
NodeT Node
Tipo de node.
Definition: tpl_netgraph.H:215
Definition: tpl_graph.H:751
ArcT Arc
Tipo de arco.
Definition: tpl_netcapgraph.H:68
ArcT Arc
Tipo de arco.
Definition: tpl_netgraph.H:212
Aux_Net * compute_aux_net()
Definition: tpl_netcapgraph.H:137
Net_Graph< NodeT, ArcT > Net_Class
La clase de red tradicional.
Definition: tpl_netcapgraph.H:66
#define ARC_COOKIE(p)
Definition: aleph-graph.H:281
Net_Graph< Net_Node< Empty_Class, Flow_Type >, Net_Arc< bool, Flow_Type > > Aux_Net
Definition: tpl_netcapgraph.H:116
Net_Cap_Node(Net_Cap_Node *node)
Definition: tpl_netcapgraph.H:34
void clear_graph(GT &g)
Definition: tpl_graph.H:2486
void update()
Definition: tpl_netcapgraph.H:189
Node::Node_Type Node_Type
Tipo de atributo que almacena un nodo.
Definition: tpl_netcapgraph.H:74
Definition: tpl_netgraph.H:2208
Arc::Flow_Type Flow_Type
Tipo que representa la capacidad y el flujo.
Definition: tpl_netcapgraph.H:72
void next()
Adelanta el iterador una posición.
Definition: filter_iterator.H:143
NodeT Node
Tipo de node.
Definition: tpl_netcapgraph.H:70
Definition: tpl_netgraph.H:205
Definition: tpl_graph.H:814
Aux_Net * get_aux_net()
Definition: tpl_netcapgraph.H:123
Node * insert_node()
Definition: tpl_netgraph.H:461
Node * insert_node(const Node_Type &node_info)
Definition: tpl_netgraph.H:434
Definition: tpl_netgraph.H:141
Arc::Arc_Type Arc_Type
Tipo de atributo que almacena un arco.
Definition: tpl_netcapgraph.H:76