diff -r ef2d00e46897 -r c2992fd74dad lemon/graph_adaptor.h --- a/lemon/graph_adaptor.h Wed Feb 22 12:45:59 2006 +0000 +++ b/lemon/graph_adaptor.h Wed Feb 22 18:26:56 2006 +0000 @@ -29,13 +29,10 @@ #include #include -#include -#include -#include -#include -#include -#include + +#include #include + #include namespace lemon { @@ -117,10 +114,6 @@ int id(const Node& v) const { return graph->id(v); } int id(const Edge& e) const { return graph->id(e); } - Edge oppositeNode(const Edge& e) const { - return Edge(graph->opposite(e)); - } - template class NodeMap : public _Graph::template NodeMap<_Value> { public: @@ -145,10 +138,10 @@ template class GraphAdaptor : - public IterableGraphExtender > { + public GraphAdaptorExtender > { public: typedef _Graph Graph; - typedef IterableGraphExtender > Parent; + typedef GraphAdaptorExtender > Parent; protected: GraphAdaptor() : Parent() { } @@ -198,10 +191,10 @@ template class RevGraphAdaptor : - public IterableGraphExtender > { + public GraphAdaptorExtender > { public: typedef _Graph Graph; - typedef IterableGraphExtender< + typedef GraphAdaptorExtender< RevGraphAdaptorBase<_Graph> > Parent; protected: RevGraphAdaptor() { } @@ -322,6 +315,7 @@ /// bool hidden(const Edge& e) const { return !(*edge_filter_map)[e]; } + typedef False FindEdgeTag; typedef False NodeNumTag; typedef False EdgeNumTag; }; @@ -428,6 +422,7 @@ /// bool hidden(const Edge& e) const { return !(*edge_filter_map)[e]; } + typedef False FindEdgeTag; typedef False NodeNumTag; typedef False EdgeNumTag; }; @@ -496,11 +491,11 @@ template class SubGraphAdaptor : - public IterableGraphExtender< + public GraphAdaptorExtender< SubGraphAdaptorBase<_Graph, NodeFilterMap, EdgeFilterMap, checked> > { public: typedef _Graph Graph; - typedef IterableGraphExtender< + typedef GraphAdaptorExtender< SubGraphAdaptorBase<_Graph, NodeFilterMap, EdgeFilterMap> > Parent; protected: SubGraphAdaptor() { } @@ -703,13 +698,13 @@ }; template - class UGraphAdaptorBase : - public UGraphExtender > { + class UndirectGraphAdaptorBase : + public UGraphBaseExtender > { public: typedef _Graph Graph; - typedef UGraphExtender > Parent; + typedef UGraphBaseExtender > Parent; protected: - UGraphAdaptorBase() : Parent() { } + UndirectGraphAdaptorBase() : Parent() { } public: typedef typename Parent::UEdge UEdge; typedef typename Parent::Edge Edge; @@ -717,17 +712,17 @@ template class EdgeMap { protected: - const UGraphAdaptorBase<_Graph>* g; + const UndirectGraphAdaptorBase<_Graph>* g; template friend class EdgeMap; typename _Graph::template EdgeMap forward_map, backward_map; public: typedef T Value; typedef Edge Key; - EdgeMap(const UGraphAdaptorBase<_Graph>& _g) : g(&_g), + EdgeMap(const UndirectGraphAdaptorBase<_Graph>& _g) : g(&_g), forward_map(*(g->graph)), backward_map(*(g->graph)) { } - EdgeMap(const UGraphAdaptorBase<_Graph>& _g, T a) : g(&_g), + EdgeMap(const UndirectGraphAdaptorBase<_Graph>& _g, T a) : g(&_g), forward_map(*(g->graph), a), backward_map(*(g->graph), a) { } void set(Edge e, T a) { @@ -753,10 +748,10 @@ typedef T Value; typedef UEdge Key; - UEdgeMap(const UGraphAdaptorBase<_Graph>& g) : + UEdgeMap(const UndirectGraphAdaptorBase<_Graph>& g) : map(*(g.graph)) { } - UEdgeMap(const UGraphAdaptorBase<_Graph>& g, T a) : + UEdgeMap(const UndirectGraphAdaptorBase<_Graph>& g, T a) : map(*(g.graph), a) { } void set(UEdge e, T a) { @@ -778,17 +773,17 @@ /// /// \author Marton Makai template - class UGraphAdaptor : - public IterableUGraphExtender< - UGraphAdaptorBase<_Graph> > { + class UndirectGraphAdaptor : + public UGraphAdaptorExtender< + UndirectGraphAdaptorBase<_Graph> > { public: typedef _Graph Graph; - typedef IterableUGraphExtender< - UGraphAdaptorBase<_Graph> > Parent; + typedef UGraphAdaptorExtender< + UndirectGraphAdaptorBase<_Graph> > Parent; protected: - UGraphAdaptor() { } + UndirectGraphAdaptor() { } public: - UGraphAdaptor(_Graph& _graph) { + UndirectGraphAdaptor(_Graph& _graph) { setGraph(_graph); } }; @@ -1083,11 +1078,11 @@ template class SubBidirGraphAdaptor : - public IterableGraphExtender< + public GraphAdaptorExtender< SubBidirGraphAdaptorBase<_Graph, ForwardFilterMap, BackwardFilterMap> > { public: typedef _Graph Graph; - typedef IterableGraphExtender< + typedef GraphAdaptorExtender< SubBidirGraphAdaptorBase< _Graph, ForwardFilterMap, BackwardFilterMap> > Parent; protected: @@ -1341,11 +1336,11 @@ /// template class ErasingFirstGraphAdaptor : - public IterableGraphExtender< + public GraphAdaptorExtender< ErasingFirstGraphAdaptorBase<_Graph, FirstOutEdgesMap> > { public: typedef _Graph Graph; - typedef IterableGraphExtender< + typedef GraphAdaptorExtender< ErasingFirstGraphAdaptorBase<_Graph, FirstOutEdgesMap> > Parent; ErasingFirstGraphAdaptor(Graph& _graph, FirstOutEdgesMap& _first_out_edges) { @@ -1711,9 +1706,9 @@ template class SplitGraphAdaptor - : public IterableGraphExtender > { + : public GraphAdaptorExtender > { public: - typedef IterableGraphExtender > Parent; + typedef GraphAdaptorExtender > Parent; SplitGraphAdaptor(_Graph& graph) { Parent::setGraph(graph);