COIN-OR::LEMON - Graph Library

Changeset 67:5f86199dcf3e in lemon-0.x


Ignore:
Timestamp:
02/06/04 12:45:47 (21 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@82
Message:

.

Location:
src/work
Files:
2 edited

Legend:

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

    r62 r67  
    66  class EdgeIt {};
    77 
    8   class InEdgeIt : public EdgeIt
     8  class InEdgeIt : public EdgeIt {};
    99  class OutEdgeIt : public EdgeIt {};
    1010  class SymEdgeIt : public EdgeIt {};
     
    1313  class NodeIt {};
    1414   
    15   NodeIt &getFirst(NodeIt &) const {};
    16   InEdgeIt &getFirst(InEdgeIt &,const NodeIt) const {};
    17   OutEdgeIt &getFirst(OutEdgeIt &,const NodeIt) const {};
    18   SymEdgeIt &getFirst(SymEdgeIt &,const NodeIt) const {};
    19   EachEdgeIt &getFirst(EachEdgeIt &) const {};
     15  NodeIt &getFirst(NodeIt &) const {}
     16  InEdgeIt &getFirst(InEdgeIt &, NodeIt) const {}
     17  OutEdgeIt &getFirst(OutEdgeIt &, NodeIt) const {}
     18  SymEdgeIt &getFirst(SymEdgeIt &, NodeIt) const {}
     19  EachEdgeIt &getFirst(EachEdgeIt &) const {}
    2020
    21   NodeIt next(const NodeIt) const {};
    22   InEdgeIt next(const InEdgeIt) const {};
    23   OutEdgeIt next(const OutEdgeIt) const {};
    24   SymEdgeIt next(const SymEdgeIt) const {};
    25   EachEdgeIt next(const EachEdgeIt) const {};
     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 {}
    2626
    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 {};
     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 {}
    3232
    33   NodeIt head(const EdgeIt) const {};
    34   NodeIt tail(const EdgeIt) const {};
     33  NodeIt head(EdgeIt) const {}
     34  NodeIt tail(EdgeIt) const {}
    3535 
    36   NodeIt aNode(const InEdgeIt) const {};
    37   NodeIt aNode(const OutEdgeIt) const {};
    38   NodeIt aNode(const SymEdgeIt) const {};
     36  NodeIt aNode(InEdgeIt) const {}
     37  NodeIt aNode(OutEdgeIt) const {}
     38  NodeIt aNode(SymEdgeIt) const {}
    3939
    40   NodeIt bNode(const InEdgeIt) const {};
    41   NodeIt bNode(const OutEdgeIt) const {};
    42   NodeIt bNode(const SymEdgeIt) const {};
     40  NodeIt bNode(InEdgeIt) const {}
     41  NodeIt bNode(OutEdgeIt) const {}
     42  NodeIt bNode(SymEdgeIt) const {}
    4343
    44   bool valid(const NodeIt) const {};
    45   bool valid(const EdgeIt) const {};
     44  //bool valid(const NodeIt) const {};
     45  //bool valid(const EdgeIt) const {};
    4646
    47   void setInvalid(NodeIt &) const {};
    48   void setInvalid(EdgeIt &) const {};
     47  //void setInvalid(NodeIt &) const {};
     48  //void setInvalid(EdgeIt &) const {};
    4949 
    50   NodeIt addNode() {};
    51   EdgeIt addEdge(const NodeIt from,const NodeIt to) {};
     50  NodeIt addNode() {}
     51  EdgeIt addEdge(NodeIt tail, NodeIt head) {}
    5252   
    53   void delete(NodeIt n) {};
    54   void delete(EdgeIt e) {};
     53  void erase(NodeIt n) {}
     54  void erase(EdgeIt e) {}
    5555
    56   void clear() {};
     56  void clear() {}
    5757
    5858  template<class T> class NodeMap
     
    6161    typedef T ValueType;
    6262    typedef NodeIt KeyType;
    63     void set(const NodeIt i, const T &t) {};
    64     T get(const NodeIt i) const {};
    65     T &operator[](const NodeIt i) {};
     63    void set(NodeIt i, T t) {}
     64    T get(NodeIt i) const {}
     65    T &operator[](NodeIt i) {}
    6666     
    67     NodeMap(const Graph &G) {};
     67    NodeMap(const Graph &G) {}
     68    NodeMap(const Graph &G, T t) {}
    6869  };
    6970
     
    7374    typedef T ValueType;
    7475    typedef EdgeIt KeyType;
    75     void set(const EdgeIt i, const T &t) {};
    76     T get(const EdgeIt i) const {};
    77     T &operator[](const EdgeIt i) {};
     76    void set(EdgeIt i, T t) {}
     77    T get(EdgeIt i) const {}
     78    T &operator[](EdgeIt i) {}
    7879     
    79     EdgeMap(const Graph &G) {};
     80    EdgeMap(const Graph &G) {}
     81    EdgeMap(const Graph &G, T t) {}
    8082  };
    8183};
  • src/work/list_graph.hh

    r64 r67  
    213213   
    214214    ~ListGraph() {
    215       while (first<EachNodeIt>().valid()) deleteNode(first<EachNodeIt>());
     215      while (first<EachNodeIt>().valid()) erase(first<EachNodeIt>());
    216216    }
    217217
     
    294294    }
    295295
    296     void deleteNode(NodeIt i) {
    297       while (first<OutEdgeIt>(i).valid()) deleteEdge(first<OutEdgeIt>(i));
    298       while (first<InEdgeIt>(i).valid()) deleteEdge(first<InEdgeIt>(i));
     296    void erase(NodeIt i) {
     297      while (first<OutEdgeIt>(i).valid()) erase(first<OutEdgeIt>(i));
     298      while (first<InEdgeIt>(i).valid()) erase(first<InEdgeIt>(i));
    299299      _delete_node(i.node);
    300300    }
    301301 
    302     void deleteEdge(EdgeIt e) { _delete_edge(e.edge); }
     302    void erase(EdgeIt e) { _delete_edge(e.edge); }
    303303
    304304    void setTail(EdgeIt e, NodeIt tail) {
Note: See TracChangeset for help on using the changeset viewer.