COIN-OR::LEMON - Graph Library

Changeset 199:98b93792541e in lemon-0.x


Ignore:
Timestamp:
03/18/04 12:35:41 (16 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@277
Message:

.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/marci/graph_wrapper.h

    r174 r199  
    99  template<typename Graph>
    1010  class TrivGraphWrapper {
     11  protected:
    1112    Graph* graph;
    1213 
     
    8889  class RevGraphWrapper
    8990  {
     91  protected:
    9092    Graph* graph;
    9193 
     
    167169  template<typename Graph>
    168170  class UndirGraphWrapper {
     171  protected:
    169172    Graph* graph;
    170173 
     
    400403    typedef typename Graph::OutEdgeIt OldOutEdgeIt;
    401404    typedef typename Graph::InEdgeIt OldInEdgeIt;
     405  protected:
    402406    const Graph* graph;
    403407    FlowMap* flow;
     
    832836    FilterGraphWrapper(const Graph& _G, FlowMap& _flow,
    833837                           const CapacityMap& _capacity) :
    834       ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>(_G, _flow, _capacity), dist(*this) {
     838      ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>(_G, _flow, _capacity), dist(*this, graph->nodeNum()) {
    835839    }
    836840
    837841    OutEdgeIt& /*getF*/first(OutEdgeIt& e, const Node& n) const {
    838842      ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::/*getF*/first(e, n);
    839       while (valid(e) && (dist.get(tail(e))+1!=dist.get(head(e))))
     843      while (valid(e) && (dist.get(tail(e))/*+1!=*/>=dist.get(head(e))))
    840844        ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e);
    841845      return e;
     
    848852    OutEdgeIt& next(OutEdgeIt& e) const {
    849853      ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e);
    850       while (valid(e) && (dist.get(tail(e))+1!=dist.get(head(e))))
     854      while (valid(e) && (dist.get(tail(e))/*+1!*/>=dist.get(head(e))))
    851855        ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(e);
    852856      return e;
     
    860864      OutEdgeIt f(e);
    861865      ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(f);
    862       while (valid(f) && (dist.get(tail(f))+1!=dist.get(head(f))))
     866      while (valid(f) && (dist.get(tail(f))/*+1!=*/>=dist.get(head(f))))
    863867        ErasingResGraphWrapper<Graph, Number, FlowMap, CapacityMap>::next(f);
    864868      first_out_edges.set(this->tail(e), f);
Note: See TracChangeset for help on using the changeset viewer.