lemon/sub_graph.h
changeset 1948 9e9c035a08be
parent 1875 98698b69a902
child 1956 a055123339d5
equal deleted inserted replaced
1:1b42db7e234e 2:3c75238b1954
   692 
   692 
   693 //   template<typename Graph, typename Number, 
   693 //   template<typename Graph, typename Number, 
   694 // 	   typename CapacityMap, typename FlowMap>
   694 // 	   typename CapacityMap, typename FlowMap>
   695 //   class ResGraph
   695 //   class ResGraph
   696 //     : public IterableGraphExtender<EdgeSubGraphBase<
   696 //     : public IterableGraphExtender<EdgeSubGraphBase<
   697 //     UndirGraphAdaptor<Graph> > > {
   697 //     UGraphAdaptor<Graph> > > {
   698 //   public:
   698 //   public:
   699 //     typedef IterableGraphExtender<EdgeSubGraphBase<
   699 //     typedef IterableGraphExtender<EdgeSubGraphBase<
   700 //       UndirGraphAdaptor<Graph> > > Parent;
   700 //       UGraphAdaptor<Graph> > > Parent;
   701 
   701 
   702 //   protected:
   702 //   protected:
   703 //     UndirGraphAdaptor<Graph> undir;
   703 //     UGraphAdaptor<Graph> u;
   704 
   704 
   705 //     const CapacityMap* capacity;
   705 //     const CapacityMap* capacity;
   706 //     FlowMap* flow;
   706 //     FlowMap* flow;
   707 
   707 
   708 //     typename Parent::NodesImpl nodes;
   708 //     typename Parent::NodesImpl nodes;
   716 //       flow=&_flow;
   716 //       flow=&_flow;
   717 //     }
   717 //     }
   718 
   718 
   719 //   public:
   719 //   public:
   720 
   720 
   721 //     typedef typename UndirGraphAdaptor<Graph>::Node Node;
   721 //     typedef typename UGraphAdaptor<Graph>::Node Node;
   722 //     typedef typename UndirGraphAdaptor<Graph>::Edge Edge;
   722 //     typedef typename UGraphAdaptor<Graph>::Edge Edge;
   723 //     typedef typename UndirGraphAdaptor<Graph>::UndirEdge UndirEdge;
   723 //     typedef typename UGraphAdaptor<Graph>::UEdge UEdge;
   724 
   724 
   725 //     ResGraphAdaptor(Graph& _graph, 
   725 //     ResGraphAdaptor(Graph& _graph, 
   726 // 		    const CapacityMap& _capacity, FlowMap& _flow) 
   726 // 		    const CapacityMap& _capacity, FlowMap& _flow) 
   727 //       : Parent(), undir(_graph), capacity(&_capacity), flow(&_flow),
   727 //       : Parent(), u(_graph), capacity(&_capacity), flow(&_flow),
   728 // 	nodes(*this, _graph), edges(*this, _graph) {
   728 // 	nodes(*this, _graph), edges(*this, _graph) {
   729 //       Parent::construct(undir, nodes, edges);
   729 //       Parent::construct(u, nodes, edges);
   730 //       setFlowMap(_flow);
   730 //       setFlowMap(_flow);
   731 //       setCapacityMap(_capacity);
   731 //       setCapacityMap(_capacity);
   732 //       typename Graph::Edge edge; 
   732 //       typename Graph::Edge edge; 
   733 //       for (_graph.first(edge); edge != INVALID; _graph.next(edge)) {
   733 //       for (_graph.first(edge); edge != INVALID; _graph.next(edge)) {
   734 // 	if ((*flow)[edge] != (*capacity)[edge]) {
   734 // 	if ((*flow)[edge] != (*capacity)[edge]) {
   768     
   768     
   769 //     bool direction(const Edge& edge) const {
   769 //     bool direction(const Edge& edge) const {
   770 //       return Parent::getGraph().direction(edge);
   770 //       return Parent::getGraph().direction(edge);
   771 //     }
   771 //     }
   772 
   772 
   773 //     Edge direct(const UndirEdge& edge, bool direction) const {
   773 //     Edge direct(const UEdge& edge, bool direction) const {
   774 //       return Parent::getGraph().direct(edge, direction);
   774 //       return Parent::getGraph().direct(edge, direction);
   775 //     }
   775 //     }
   776 
   776 
   777 //     Edge direct(const UndirEdge& edge, const Node& node) const {
   777 //     Edge direct(const UEdge& edge, const Node& node) const {
   778 //       return Parent::getGraph().direct(edge, node);
   778 //       return Parent::getGraph().direct(edge, node);
   779 //     }
   779 //     }
   780 
   780 
   781 //     Edge oppositeEdge(const Edge& edge) const {
   781 //     Edge oppositeEdge(const Edge& edge) const {
   782 //       return Parent::getGraph().oppositeEdge(edge);
   782 //       return Parent::getGraph().oppositeEdge(edge);