UndirListGraph, somebody should try it.
authormarci
Tue, 20 Apr 2004 13:43:36 +0000
changeset 3540e8eb96c22ca
parent 353 eeae2f4a0d74
child 355 c6ccd4b430d3
UndirListGraph, somebody should try it.
src/work/list_graph.h
     1.1 --- a/src/work/list_graph.h	Tue Apr 20 12:10:36 2004 +0000
     1.2 +++ b/src/work/list_graph.h	Tue Apr 20 13:43:36 2004 +0000
     1.3 @@ -505,7 +505,7 @@
     1.4        bool out_or_in; //1 iff out, 0 iff in
     1.5        //node_item* v;
     1.6        //protected:
     1.7 -    public: //for alpar
     1.8 +    protected: //for alpar
     1.9        SymEdgeIt(const Node& _v) /*: v(_v.node)*/ { 
    1.10  	out_or_in=1;
    1.11  	edge=_v.node->_first_out_edge; 
    1.12 @@ -536,46 +536,12 @@
    1.13        Node bNode() const { 
    1.14  	return (out_or_in) ? Node(edge->_head) : Node(edge->_tail); }
    1.15      };
    1.16 -
    1.17    };
    1.18  
    1.19 -//   template< typename T >
    1.20 -//   T ListGraph::first() const { 
    1.21 -//     std::cerr << "Invalid use of template<typemane T> T ListGraph::first<T>();" << std::endl; 
    1.22 -//     return T(); 
    1.23 -//   }
    1.24 -
    1.25 -//   template<>
    1.26 -//   ListGraph::NodeIt ListGraph::first<ListGraph::NodeIt>() const { 
    1.27 -//     return firstNode(); 
    1.28 -//   }
    1.29 -
    1.30 -//   template<>
    1.31 -//   ListGraph::EdgeIt ListGraph::first<ListGraph::EdgeIt>() const { 
    1.32 -//     return firstEdge(); 
    1.33 -//   }
    1.34 -
    1.35 -//   template< typename T >
    1.36 -//   T ListGraph::first(ListGraph::Node v) const {
    1.37 -//     std::cerr << "Invalid use of template<typemane T> T ListGraph::first<T>(ListGRaph::Node);" << std::endl; 
    1.38 -//     return T(); 
    1.39 -//   } 
    1.40 -
    1.41 -//   template<>
    1.42 -//   ListGraph::OutEdgeIt ListGraph::first<ListGraph::OutEdgeIt>(const ListGraph::Node v) const { 
    1.43 -//     return firstOutEdge(v); 
    1.44 -//   }
    1.45 -
    1.46 -//   template<>
    1.47 -//   ListGraph::InEdgeIt ListGraph::first<ListGraph::InEdgeIt>(const ListGraph::Node v) const { 
    1.48 -//     return firstInEdge(v); 
    1.49 -//   }
    1.50 -
    1.51 -//   template<>
    1.52 -//   ListGraph::SymEdgeIt ListGraph::first<ListGraph::SymEdgeIt>(const ListGraph::Node v) const { 
    1.53 -//     return firstSymEdge(v); 
    1.54 -//   }
    1.55 -
    1.56 +  class UndirListGraph : public ListGraph {
    1.57 +    typedef SymEdgeIt OutEdgeIt;
    1.58 +    typedef SymEdgeIt InEdgeIt;
    1.59 +  };
    1.60  
    1.61  } //namespace hugo
    1.62