COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
01/26/06 17:24:40 (18 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2485
Message:

Bipartite => Bp
Upper => A
Lower => B

+ some bug fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/bits/iterable_graph_extender.h

    r1909 r1910  
    271271
    272272  template <typename _Base>
    273   class IterableUBipartiteGraphExtender : public _Base {
     273  class IterableBpUGraphExtender : public _Base {
    274274  public:
    275275    typedef _Base Parent;
    276     typedef IterableUBipartiteGraphExtender Graph;
     276    typedef IterableBpUGraphExtender Graph;
    277277   
    278278    typedef typename Parent::Node Node;
    279     typedef typename Parent::UpperNode UpperNode;
    280     typedef typename Parent::LowerNode LowerNode;
     279    typedef typename Parent::ANode ANode;
     280    typedef typename Parent::BNode BNode;
    281281    typedef typename Parent::Edge Edge;
    282282    typedef typename Parent::UEdge UEdge;
     
    304304    };
    305305
    306     class UpperNodeIt : public Node {
    307       friend class IterableUBipartiteGraphExtender;
    308       const Graph* graph;
    309     public:
    310    
    311       UpperNodeIt() { }
    312    
    313       UpperNodeIt(Invalid i) : Node(INVALID) { }
    314    
    315       explicit UpperNodeIt(const Graph& _graph) : graph(&_graph) {
    316         graph->firstUpper(static_cast<Node&>(*this));
    317       }
    318 
    319       UpperNodeIt(const Graph& _graph, const Node& node)
     306    class ANodeIt : public Node {
     307      friend class IterableBpUGraphExtender;
     308      const Graph* graph;
     309    public:
     310   
     311      ANodeIt() { }
     312   
     313      ANodeIt(Invalid i) : Node(INVALID) { }
     314   
     315      explicit ANodeIt(const Graph& _graph) : graph(&_graph) {
     316        graph->firstANode(static_cast<Node&>(*this));
     317      }
     318
     319      ANodeIt(const Graph& _graph, const Node& node)
    320320        : Node(node), graph(&_graph) {}
    321321   
    322       UpperNodeIt& operator++() {
    323         graph->nextUpper(*this);
    324         return *this;
    325       }
    326     };
    327 
    328     class LowerNodeIt : public Node {
    329       friend class IterableUBipartiteGraphExtender;
    330       const Graph* graph;
    331     public:
    332    
    333       LowerNodeIt() { }
    334    
    335       LowerNodeIt(Invalid i) : Node(INVALID) { }
    336    
    337       explicit LowerNodeIt(const Graph& _graph) : graph(&_graph) {
    338         graph->firstLower(static_cast<Node&>(*this));
    339       }
    340 
    341       LowerNodeIt(const Graph& _graph, const Node& node)
     322      ANodeIt& operator++() {
     323        graph->nextANode(*this);
     324        return *this;
     325      }
     326    };
     327
     328    class BNodeIt : public Node {
     329      friend class IterableBpUGraphExtender;
     330      const Graph* graph;
     331    public:
     332   
     333      BNodeIt() { }
     334   
     335      BNodeIt(Invalid i) : Node(INVALID) { }
     336   
     337      explicit BNodeIt(const Graph& _graph) : graph(&_graph) {
     338        graph->firstBNode(static_cast<Node&>(*this));
     339      }
     340
     341      BNodeIt(const Graph& _graph, const Node& node)
    342342        : Node(node), graph(&_graph) {}
    343343   
    344       LowerNodeIt& operator++() {
    345         graph->nextLower(*this);
     344      BNodeIt& operator++() {
     345        graph->nextBNode(*this);
    346346        return *this;
    347347      }
     
    349349
    350350    class EdgeIt : public Edge {
    351       friend class IterableUBipartiteGraphExtender;
     351      friend class IterableBpUGraphExtender;
    352352      const Graph* graph;
    353353    public:
     
    372372
    373373    class UEdgeIt : public UEdge {
    374       friend class IterableUBipartiteGraphExtender;
     374      friend class IterableBpUGraphExtender;
    375375      const Graph* graph;
    376376    public:
     
    394394
    395395    class OutEdgeIt : public Edge {
    396       friend class IterableUBipartiteGraphExtender;
     396      friend class IterableBpUGraphExtender;
    397397      const Graph* graph;
    398398    public:
     
    419419
    420420    class InEdgeIt : public Edge {
    421       friend class IterableUBipartiteGraphExtender;
     421      friend class IterableBpUGraphExtender;
    422422      const Graph* graph;
    423423    public:
     
    471471 
    472472    class IncEdgeIt : public Parent::UEdge {
    473       friend class IterableUBipartiteGraphExtender;
     473      friend class IterableBpUGraphExtender;
    474474      const Graph* graph;
    475475      bool direction;
Note: See TracChangeset for help on using the changeset viewer.