lemon/bpugraph_adaptor.h
changeset 2261 c52b572c294f
parent 2084 59769591eb60
child 2384 805c5a2a36dd
equal deleted inserted replaced
2:865378fe8d59 3:5bed726a3f74
    85     void firstIn(Edge& i, const Node& n) const { graph->firstIn(i, n); }
    85     void firstIn(Edge& i, const Node& n) const { graph->firstIn(i, n); }
    86     void firstOut(Edge& i, const Node& n ) const { graph->firstOut(i, n); }
    86     void firstOut(Edge& i, const Node& n ) const { graph->firstOut(i, n); }
    87     void firstInc(UEdge &i, bool &d, const Node &n) const {
    87     void firstInc(UEdge &i, bool &d, const Node &n) const {
    88       graph->firstInc(i, d, n);
    88       graph->firstInc(i, d, n);
    89     }
    89     }
       
    90     void firstFromANode(UEdge& i, const Node& n) const {
       
    91       graph->firstFromANode(i, n);
       
    92     }
       
    93     void firstFromBNode(UEdge& i, const Node& n) const {
       
    94       graph->firstFromBNode(i, n);
       
    95     }
    90 
    96 
    91     void next(Node& i) const { graph->next(i); }
    97     void next(Node& i) const { graph->next(i); }
    92     void nextANode(Node& i) const { graph->nextANode(i); }
    98     void nextANode(Node& i) const { graph->nextANode(i); }
    93     void nextBNode(Node& i) const { graph->nextBNode(i); }
    99     void nextBNode(Node& i) const { graph->nextBNode(i); }
    94     void next(Edge& i) const { graph->next(i); }
   100     void next(Edge& i) const { graph->next(i); }
    95     void next(UEdge& i) const { graph->next(i); }
   101     void next(UEdge& i) const { graph->next(i); }
    96     void nextIn(Edge& i) const { graph->nextIn(i); }
   102     void nextIn(Edge& i) const { graph->nextIn(i); }
    97     void nextOut(Edge& i) const { graph->nextOut(i); }
   103     void nextOut(Edge& i) const { graph->nextOut(i); }
    98     void nextInc(UEdge &i, bool &d) const { graph->nextInc(i, d); }
   104     void nextInc(UEdge &i, bool &d) const { graph->nextInc(i, d); }
       
   105     void nextFromANode(UEdge& i) const { graph->nextFromANode(i); }
       
   106     void nextFromBNode(UEdge& i) const { graph->nextFromBNode(i); }
    99 
   107 
   100     Node source(const UEdge& e) const { return graph->source(e); }
   108     Node source(const UEdge& e) const { return graph->source(e); }
   101     Node target(const UEdge& e) const { return graph->target(e); }
   109     Node target(const UEdge& e) const { return graph->target(e); }
   102 
   110 
   103     Node source(const Edge& e) const { return graph->source(e); }
   111     Node source(const Edge& e) const { return graph->source(e); }
   147     int id(const BNode& v) const { return graph->id(v); }
   155     int id(const BNode& v) const { return graph->id(v); }
   148     int id(const Edge& e) const { return graph->id(e); }
   156     int id(const Edge& e) const { return graph->id(e); }
   149     int id(const UEdge& e) const { return graph->id(e); }
   157     int id(const UEdge& e) const { return graph->id(e); }
   150 
   158 
   151     Node fromNodeId(int id) const { return graph->fromNodeId(id); }
   159     Node fromNodeId(int id) const { return graph->fromNodeId(id); }
   152     ANode fromANodeId(int id) const { return graph->fromANodeId(id); }
   160     ANode nodeFromANodeId(int id) const { return graph->nodeFromANodeId(id); }
   153     BNode fromBNodeId(int id) const { return graph->fromBNodeId(id); }
   161     BNode nodeFromBNodeId(int id) const { return graph->nodeFromBNodeId(id); }
   154     Edge fromEdgeId(int id) const { return graph->fromEdgeId(id); }
   162     Edge fromEdgeId(int id) const { return graph->fromEdgeId(id); }
   155     UEdge fromUEdgeId(int id) const { return graph->fromUEdgeId(id); }
   163     UEdge fromUEdgeId(int id) const { return graph->fromUEdgeId(id); }
   156 
   164 
   157     int maxNodeId() const { return graph->maxNodeId(); }
   165     int maxNodeId() const { return graph->maxNodeId(); }
   158     int maxANodeId() const { return graph->maxANodeId(); }
   166     int maxANodeId() const { return graph->maxANodeId(); }
   338     void firstBNode(Node& i) const { Parent::firstANode(i); }
   346     void firstBNode(Node& i) const { Parent::firstANode(i); }
   339 
   347 
   340     void nextANode(Node& i) const { Parent::nextBNode(i); }
   348     void nextANode(Node& i) const { Parent::nextBNode(i); }
   341     void nextBNode(Node& i) const { Parent::nextANode(i); }
   349     void nextBNode(Node& i) const { Parent::nextANode(i); }
   342 
   350 
       
   351     void firstFromANode(UEdge& i, const Node& n) const {
       
   352       Parent::firstFromBNode(i, n);
       
   353     }
       
   354     void firstFromBNode(UEdge& i, const Node& n) const {
       
   355       Parent::firstFromANode(i, n);
       
   356     }
       
   357 
       
   358     void nextFromANode(UEdge& i) const { Parent::nextFromBNode(i); }
       
   359     void nextFromBNode(UEdge& i) const { Parent::nextFromANode(i); }
       
   360 
   343     int id(const ANode& v) const { return Parent::id(v); }
   361     int id(const ANode& v) const { return Parent::id(v); }
   344     int id(const BNode& v) const { return Parent::id(v); }
   362     int id(const BNode& v) const { return Parent::id(v); }
   345 
   363 
   346     ANode fromANodeId(int id) const { return Parent::fromBNodeId(id); }
   364     ANode nodeFromANodeId(int id) const { return Parent::nodeFromBNodeId(id); }
   347     BNode fromBNodeId(int id) const { return Parent::fromANodeId(id); }
   365     BNode nodeFromBNodeId(int id) const { return Parent::nodeFromANodeId(id); }
   348 
   366 
   349     int maxANodeId() const { return Parent::maxBNodeId(); }
   367     int maxANodeId() const { return Parent::maxBNodeId(); }
   350     int maxBNodeId() const { return Parent::maxANodeId(); }
   368     int maxBNodeId() const { return Parent::maxANodeId(); }
   351 
   369 
   352     int aNodeNum() const { return Parent::bNodeNum(); }
   370     int aNodeNum() const { return Parent::bNodeNum(); }
   547   /// \brief Bipartite graph adaptor to implement matching algorithms.
   565   /// \brief Bipartite graph adaptor to implement matching algorithms.
   548   ///
   566   ///
   549   /// Bipartite graph adaptor to implement matchings. It implements
   567   /// Bipartite graph adaptor to implement matchings. It implements
   550   /// the residual graph of the matching.
   568   /// the residual graph of the matching.
   551   template <typename _BpUGraph, 
   569   template <typename _BpUGraph, 
   552             typename _ANMatchingMap, typename _BNMatchingMap>
   570             typename _ANMatchingMap = 
       
   571             typename _BpUGraph::template ANodeMap<typename _BpUGraph::UEdge>, 
       
   572             typename _BNMatchingMap =
       
   573             typename _BpUGraph::template BNodeMap<typename _BpUGraph::UEdge> >
   553   class MatchingBpUGraphAdaptor 
   574   class MatchingBpUGraphAdaptor 
   554     : public BpUGraphAdaptorExtender<
   575     : public BpUGraphAdaptorExtender<
   555     MatchingBpUGraphAdaptorBase<_BpUGraph, _ANMatchingMap, _BNMatchingMap> > 
   576     MatchingBpUGraphAdaptorBase<_BpUGraph, _ANMatchingMap, _BNMatchingMap> > 
   556   { 
   577   { 
   557   public:
   578   public: