src/work/marci/leda/leda_graph_wrapper.h
changeset 921 818510fa3d99
parent 650 588ff2ca55bd
child 986 e997802b855c
equal deleted inserted replaced
8:0cfe5d89ad08 9:22f1e7f2cdc5
     1 // -*- c++ -*-
     1 // -*- c++ -*-
     2 #ifndef HUGO_LEDA_GRAPH_WRAPPER_H
     2 #ifndef LEMON_LEDA_GRAPH_WRAPPER_H
     3 #define HUGO_LEDA_GRAPH_WRAPPER_H
     3 #define LEMON_LEDA_GRAPH_WRAPPER_H
     4 
     4 
     5 #include <LEDA/graph.h>
     5 #include <LEDA/graph.h>
     6 #include <LEDA/node_array.h>
     6 #include <LEDA/node_array.h>
     7 #include <LEDA/edge_array.h>
     7 #include <LEDA/edge_array.h>
     8 #include <LEDA/node_map.h>
     8 #include <LEDA/node_map.h>
    12 
    12 
    13 //#if defined(LEDA_NAMESPACE)
    13 //#if defined(LEDA_NAMESPACE)
    14 //using namespace leda;
    14 //using namespace leda;
    15 //#endif
    15 //#endif
    16 
    16 
    17 #include <hugo/invalid.h>
    17 #include <lemon/invalid.h>
    18 
    18 
    19 namespace hugo {
    19 namespace lemon {
    20 
    20 
    21   /// \brief A graph wrapper structure for wrapping LEDA graphs in HUGO.
    21   /// \brief A graph wrapper structure for wrapping LEDA graphs in LEMON.
    22   ///
    22   ///
    23   /// This graph wrapper class wraps LEDA graphs and LEDA parametrized graphs
    23   /// This graph wrapper class wraps LEDA graphs and LEDA parametrized graphs
    24   /// to satisfy HUGO graph concepts.
    24   /// to satisfy LEMON graph concepts.
    25   /// Then the generic HUGOlib algorithms and wrappers can be used 
    25   /// Then the generic LEMON algorithms and wrappers can be used 
    26   /// with LEDA graphs. 
    26   /// with LEDA graphs. 
    27   /// \ingroup gwrapper
    27   /// \ingroup gwrapper
    28   template<typename Graph>
    28   template<typename Graph>
    29   class LedaGraphWrapper
    29   class LedaGraphWrapper
    30   {
    30   {
   296       //void update(T a) { leda_stuff.init(leda_stuff.get_graph()/**(G.l_graph)*/, a); }   //FIXME: Is it necessary
   296       //void update(T a) { leda_stuff.init(leda_stuff.get_graph()/**(G.l_graph)*/, a); }   //FIXME: Is it necessary
   297     };
   297     };
   298 
   298 
   299 
   299 
   300     /// This class is to wrap existing 
   300     /// This class is to wrap existing 
   301     /// LEDA node-maps to HUGO ones.
   301     /// LEDA node-maps to LEMON ones.
   302     template<typename T> class NodeMapWrapper
   302     template<typename T> class NodeMapWrapper
   303     {
   303     {
   304       leda_node_array<T>* leda_stuff;
   304       leda_node_array<T>* leda_stuff;
   305     public:
   305     public:
   306       typedef T ValueType;
   306       typedef T ValueType;
   318       void update() { /*leda_stuff.init(leda_stuff.get_graph());*/ }
   318       void update() { /*leda_stuff.init(leda_stuff.get_graph());*/ }
   319       //void update(T a) { leda_stuff.init(leda_stuff.get_graph()/**(G.l_graph)*/, a); }   //FIXME: Is it necessary
   319       //void update(T a) { leda_stuff.init(leda_stuff.get_graph()/**(G.l_graph)*/, a); }   //FIXME: Is it necessary
   320     };
   320     };
   321 
   321 
   322     /// This class is to wrap existing 
   322     /// This class is to wrap existing 
   323     /// LEDA edge-maps to HUGO ones.
   323     /// LEDA edge-maps to LEMON ones.
   324     template<typename T> class EdgeMapWrapper
   324     template<typename T> class EdgeMapWrapper
   325     {
   325     {
   326       leda_edge_array<T>* leda_stuff;
   326       leda_edge_array<T>* leda_stuff;
   327     public:
   327     public:
   328       typedef T ValueType;
   328       typedef T ValueType;
   377     LedaGraph() { 
   377     LedaGraph() { 
   378       Parent::setGraph(gr); 
   378       Parent::setGraph(gr); 
   379     }
   379     }
   380   };
   380   };
   381 
   381 
   382 } //namespace hugo
   382 } //namespace lemon
   383 
   383 
   384 #endif // HUGO_LEDA_GRAPH_WRAPPER_H
   384 #endif // LEMON_LEDA_GRAPH_WRAPPER_H