src/work/johanna/contract_wrapper.h
author klao
Tue, 27 Apr 2004 13:53:27 +0000
changeset 445 6fe0d7d70674
child 921 818510fa3d99
permissions -rw-r--r--
Egy helyes (warning nelkuli) megvalositasa az operator<< -nek az stGraphWrapper
Node es Edge-enek. Csak a konverziok es templates fuggvenyek "alacsony
prioritasa" miatt hasznalhatatlan.

Magyarul az stGW::Node -ra jol mukodik, de a NodeIt-ra mar nem, pedig van hozza
konverzio. Csak akkor mar inkabb a ListGraph::Node-jara definialt nem
template-es fuggvenyt hasznalja.
beckerjc@394
     1
// -*- C++ -*- //
beckerjc@394
     2
beckerjc@394
     3
#ifndef HUGO_CONTRACT_WRAPPER
beckerjc@394
     4
#define HUGO_CONTRACT_WRAPPER
beckerjc@394
     5
beckerjc@394
     6
#include <graph_wrapper.h>
beckerjc@394
     7
beckerjc@394
     8
namespace hugo {
beckerjc@394
     9
beckerjc@394
    10
  template<typename Graph>
beckerjc@394
    11
  class ConractWrapper : public GraphWrapper<const Graph> {
beckerjc@394
    12
beckerjc@394
    13
  public:
beckerjc@394
    14
    typedef typename Parent::NodeMap NodeMap;
beckerjc@394
    15
    class Node;
beckerjc@394
    16
beckerjc@394
    17
  private:
beckerjc@394
    18
    typedef GraphWrapper<Graph> Parent;
beckerjc@394
    19
    
beckerjc@394
    20
beckerjc@394
    21
    UnionFindEnum<Node, NodeMap> parts; 
beckerjc@394
    22
 
beckerjc@394
    23
  public:
beckerjc@394
    24
beckerjc@394
    25
    ConractWrapper(const Graph& _graph) : Parent(_graph) { }
beckerjc@394
    26
beckerjc@394
    27
beckerjc@394
    28
beckerjc@394
    29
beckerjc@394
    30
beckerjc@394
    31
  };
beckerjc@394
    32
beckerjc@394
    33
beckerjc@394
    34
beckerjc@394
    35
}
beckerjc@394
    36
#endif