src/work/alpar/emptygraph.h
changeset 114 bb07dd5b2d67
parent 62 aa1700f78754
child 145 07c32a103bbb
equal deleted inserted replaced
7:f6b5efff9301 8:37d1adce8a1d
     3 class Graph
     3 class Graph
     4 {
     4 {
     5 public:
     5 public:
     6   class EdgeIt {};
     6   class EdgeIt {};
     7   
     7   
     8   class InEdgeIt : public EdgeIt
     8   class InEdgeIt : public EdgeIt {};
     9   class OutEdgeIt : public EdgeIt {};
     9   class OutEdgeIt : public EdgeIt {};
    10   class SymEdgeIt : public EdgeIt {};
    10   class SymEdgeIt : public EdgeIt {};
    11   class EachEdgeIt : public EdgeIt {};
    11   class EachEdgeIt : public EdgeIt {};
    12 
    12 
    13   class NodeIt {};
    13   class NodeIt {};
    14     
    14     
    15   NodeIt &getFirst(NodeIt &) const {};
    15   NodeIt &getFirst(NodeIt &) const {}
    16   InEdgeIt &getFirst(InEdgeIt &,const NodeIt) const {};
    16   InEdgeIt &getFirst(InEdgeIt &, NodeIt) const {}
    17   OutEdgeIt &getFirst(OutEdgeIt &,const NodeIt) const {};
    17   OutEdgeIt &getFirst(OutEdgeIt &, NodeIt) const {}
    18   SymEdgeIt &getFirst(SymEdgeIt &,const NodeIt) const {};
    18   SymEdgeIt &getFirst(SymEdgeIt &, NodeIt) const {}
    19   EachEdgeIt &getFirst(EachEdgeIt &) const {};
    19   EachEdgeIt &getFirst(EachEdgeIt &) const {}
    20 
    20 
    21   NodeIt next(const NodeIt) const {};
    21   NodeIt next(NodeIt) const {}
    22   InEdgeIt next(const InEdgeIt) const {};
    22   InEdgeIt next(InEdgeIt) const {}
    23   OutEdgeIt next(const OutEdgeIt) const {};
    23   OutEdgeIt next(OutEdgeIt) const {}
    24   SymEdgeIt next(const SymEdgeIt) const {};
    24   SymEdgeIt next(SymEdgeIt) const {}
    25   EachEdgeIt next(const EachEdgeIt) const {};
    25   EachEdgeIt next(EachEdgeIt) const {}
    26 
    26 
    27   NodeIt &goNext(NodeIt &) const {};
    27   NodeIt &goNext(NodeIt &) const {}
    28   InEdgeIt &goNext(InEdgeIt &) const {};
    28   InEdgeIt &goNext(InEdgeIt &) const {}
    29   OutEdgeIt &goNext(OutEdgeIt &) const {};
    29   OutEdgeIt &goNext(OutEdgeIt &) const {}
    30   SymEdgeIt &goNext(SymEdgeIt &) const {};
    30   SymEdgeIt &goNext(SymEdgeIt &) const {}
    31   EachEdgeIt &goNext(EachEdgeIt &) const {};
    31   EachEdgeIt &goNext(EachEdgeIt &) const {}
    32 
    32 
    33   NodeIt head(const EdgeIt) const {};
    33   NodeIt head(EdgeIt) const {}
    34   NodeIt tail(const EdgeIt) const {};
    34   NodeIt tail(EdgeIt) const {}
    35   
    35   
    36   NodeIt aNode(const InEdgeIt) const {};
    36   NodeIt aNode(InEdgeIt) const {}
    37   NodeIt aNode(const OutEdgeIt) const {};
    37   NodeIt aNode(OutEdgeIt) const {}
    38   NodeIt aNode(const SymEdgeIt) const {};
    38   NodeIt aNode(SymEdgeIt) const {}
    39 
    39 
    40   NodeIt bNode(const InEdgeIt) const {};
    40   NodeIt bNode(InEdgeIt) const {}
    41   NodeIt bNode(const OutEdgeIt) const {};
    41   NodeIt bNode(OutEdgeIt) const {}
    42   NodeIt bNode(const SymEdgeIt) const {};
    42   NodeIt bNode(SymEdgeIt) const {}
    43 
    43 
    44   bool valid(const NodeIt) const {};
    44   //bool valid(const NodeIt) const {};
    45   bool valid(const EdgeIt) const {};
    45   //bool valid(const EdgeIt) const {};
    46 
    46 
    47   void setInvalid(NodeIt &) const {};
    47   //void setInvalid(NodeIt &) const {};
    48   void setInvalid(EdgeIt &) const {};
    48   //void setInvalid(EdgeIt &) const {};
    49   
    49   
    50   NodeIt addNode() {};
    50   NodeIt addNode() {}
    51   EdgeIt addEdge(const NodeIt from,const NodeIt to) {};
    51   EdgeIt addEdge(NodeIt tail, NodeIt head) {}
    52     
    52     
    53   void delete(NodeIt n) {};
    53   void erase(NodeIt n) {}
    54   void delete(EdgeIt e) {};
    54   void erase(EdgeIt e) {}
    55 
    55 
    56   void clear() {};
    56   void clear() {}
    57 
    57 
    58   template<class T> class NodeMap
    58   template<class T> class NodeMap
    59   {
    59   {
    60   public:
    60   public:
    61     typedef T ValueType;
    61     typedef T ValueType;
    62     typedef NodeIt KeyType;
    62     typedef NodeIt KeyType;
    63     void set(const NodeIt i, const T &t) {};
    63     void set(NodeIt i, T t) {}
    64     T get(const NodeIt i) const {};
    64     T get(NodeIt i) const {}
    65     T &operator[](const NodeIt i) {};
    65     T &operator[](NodeIt i) {}
    66       
    66       
    67     NodeMap(const Graph &G) {};
    67     NodeMap(const Graph &G) {}
       
    68     NodeMap(const Graph &G, T t) {}
    68   };
    69   };
    69 
    70 
    70   template<class T> class EdgeMap
    71   template<class T> class EdgeMap
    71   {
    72   {
    72   public:
    73   public:
    73     typedef T ValueType;
    74     typedef T ValueType;
    74     typedef EdgeIt KeyType;
    75     typedef EdgeIt KeyType;
    75     void set(const EdgeIt i, const T &t) {};
    76     void set(EdgeIt i, T t) {}
    76     T get(const EdgeIt i) const {};
    77     T get(EdgeIt i) const {}
    77     T &operator[](const EdgeIt i) {};
    78     T &operator[](EdgeIt i) {}
    78       
    79       
    79     EdgeMap(const Graph &G) {};
    80     EdgeMap(const Graph &G) {}
       
    81     EdgeMap(const Graph &G, T t) {}
    80   };
    82   };
    81 };
    83 };