COIN-OR::LEMON - Graph Library

Changeset 145:07c32a103bbb in lemon-0.x for src/work/alpar


Ignore:
Timestamp:
03/02/04 16:45:27 (20 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@201
Message:

next() -> getNext()
goNext() -> next()

Location:
src/work/alpar
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/work/alpar/emptygraph.h

    r67 r145  
    11// -*-mode: c++; -*-
    22
    3 class Graph
     3class EmptyGraph
    44{
    55public:
     6
    67  class EdgeIt {};
    78 
     
    1920  EachEdgeIt &getFirst(EachEdgeIt &) const {}
    2021
    21   NodeIt next(NodeIt) const {}
    22   InEdgeIt next(InEdgeIt) const {}
    23   OutEdgeIt next(OutEdgeIt) const {}
    24   SymEdgeIt next(SymEdgeIt) const {}
    25   EachEdgeIt next(EachEdgeIt) const {}
     22  NodeIt getNext(NodeIt) const {}
     23  InEdgeIt getNext(InEdgeIt) const {}
     24  OutEdgeIt getNext(OutEdgeIt) const {}
     25  SymEdgeIt getNext(SymEdgeIt) const {}
     26  EachEdgeIt getNext(EachEdgeIt) const {}
    2627
    27   NodeIt &goNext(NodeIt &) const {}
    28   InEdgeIt &goNext(InEdgeIt &) const {}
    29   OutEdgeIt &goNext(OutEdgeIt &) const {}
    30   SymEdgeIt &goNext(SymEdgeIt &) const {}
    31   EachEdgeIt &goNext(EachEdgeIt &) const {}
     28  NodeIt &next(NodeIt &) const {}
     29  InEdgeIt &next(InEdgeIt &) const {}
     30  OutEdgeIt &next(OutEdgeIt &) const {}
     31  SymEdgeIt &next(SymEdgeIt &) const {}
     32  EachEdgeIt &next(EachEdgeIt &) const {}
    3233
    3334  NodeIt head(EdgeIt) const {}
     
    8283  };
    8384};
     85
     86class EmptyBipGraph : public EmptyGraph
     87{
     88  class ANodeIt {};
     89  class BNodeIt {};
     90
     91  ANodeIt &next(ANodeIt &) {}
     92  BNodeIt &next(BNodeIt &) {}
     93
     94  ANodeIt &getFirst(ANodeIt &) const {}
     95  BNodeIt &getFirst(BNodeIt &) const {}
     96
     97  enum NodeClass { A = 0, B = 1 };
     98  NodeClass getClass(NodeIt n) {}
     99
     100}
  • src/work/alpar/gwrapper.h

    r105 r145  
    118118
    119119template<typename G>
     120class RevGraphExt : public G
     121{
     122public:
     123  //  typedef G BaseGraph;
     124
     125  typedef typename G::EdgeIt EdgeIt;
     126 
     127  typedef typename G::InEdgeIt OutEdgeIt;
     128  typedef typename G::OutEdgeIt InEdgeIt;
     129  typedef typename G::SymEdgeIt SymEdgeIt;
     130  typedef typename G::EachEdgeIt EachEdgeIt;
     131
     132  typedef typename G::NodeIt NodeIt;
     133   
     134//   template<typename I> I &getFirst(I &i); { return graph->getFirst(i); }
     135//   template<typename I,typename P> I &getFirst(I &i,const P &p);
     136//   { return graph->getFirst(i,p); }
     137//   template<typename I> I next(const I i); { return graph->goNext(i); }
     138//   template<typename I> I &goNext(I &i); { return graph->goNext(i); }
     139
     140  NodeIt head(const EdgeIt &e);
     141  { return G::tail(e); }
     142  NodeIt tail(const EdgeIt &e);
     143  { return G::head(e); }
     144 
     145//   template<typename I> NodeIt aNode(const I e);
     146//   { return graph->aNode(e); }
     147//   template<typename I> NodeIt bNode(const I e);
     148//   { return graph->bNode(e); }
     149 
     150//   template<typename I> bool valid(const I i);
     151//   { return graph->valid(i); }
     152 
     153//   template<typename I> void setInvalid(const I &i);
     154//   { return graph->setInvalid(i); }
     155 
     156//   NodeIt addNode(); { return graph->addNode(); }
     157
     158  EdgeIt addEdge(const NodeIt from,const NodeIt to);
     159  { return G::addEdge(to,from); }
     160 
     161//   template<I> void delete(I i); { graph->delete(i); }
     162 
     163//   void clean();  { graph->clean(); }
     164 
     165//   template<class T> class NodeMap : public typename G::NodeMap<T>;
     166//   template<class T> class EdgeMap : public typename G::EdgeMap<T>;
     167 
     168//   void SetG(G &g) {graph = &g;}
     169 
     170//   RevGraphWrapper() {graph = NULL;}
     171//   RevGraphWrapper(G &g) {graph = &g;}
     172};
     173
     174template<typename G>
    120175class SymGraphWrapper
    121176{
     
    172227  RevGraphWrapper(G &g) {graph = &g;}
    173228};
     229
     230
     231
     232
     233
     234
     235
     236
     237
     238
     239
     240
     241
     242
     243
     244
     245
    174246
    175247
Note: See TracChangeset for help on using the changeset viewer.