src/hugo/graph_wrapper.h
changeset 888 cc3590763f7f
parent 879 5e284075b193
child 891 74589d20dbc3
equal deleted inserted replaced
39:04831eacf037 40:f094479c406c
  1094     protected:
  1094     protected:
  1095       const ResGraphWrapper<Graph, Number, CapacityMap, FlowMap>* res_graph;
  1095       const ResGraphWrapper<Graph, Number, CapacityMap, FlowMap>* res_graph;
  1096     public:
  1096     public:
  1097       typedef Number ValueType;
  1097       typedef Number ValueType;
  1098       typedef Edge KeyType;
  1098       typedef Edge KeyType;
  1099       ResCap(const ResGraphWrapper<Graph, Number, CapacityMap, FlowMap>& _res_graph) : 
  1099       ResCap(const ResGraphWrapper<Graph, Number, CapacityMap, FlowMap>& 
  1100 	res_graph(&_res_graph) { }
  1100 	     _res_graph) : res_graph(&_res_graph) { }
  1101       Number operator[](const Edge& e) const { 
  1101       Number operator[](const Edge& e) const { 
  1102 	if (res_graph->forward(e)) 
  1102 	if (res_graph->forward(e)) 
  1103 	  return (*(res_graph->capacity))[e]-(*(res_graph->flow))[e]; 
  1103 	  return (*(res_graph->capacity))[e]-(*(res_graph->flow))[e]; 
  1104 	else 
  1104 	else 
  1105 	  return (*(res_graph->flow))[e]; 
  1105 	  return (*(res_graph->flow))[e];