diff -r 0508d63fcc96 -r 8d62f0072ff0 src/work/list_graph.hh --- a/src/work/list_graph.hh Fri Feb 20 21:57:39 2004 +0000 +++ b/src/work/list_graph.hh Fri Feb 20 21:59:34 2004 +0000 @@ -4,7 +4,7 @@ #include #include -namespace marci { +namespace hugo { template int count(It it) { @@ -49,8 +49,8 @@ T get(NodeIt n) const { return container[/*G.id(n)*/n.node->id]; } T& operator[](NodeIt n) { return container[/*G.id(n)*/n.node->id]; } const T& operator[](NodeIt n) const { return container[/*G.id(n)*/n.node->id]; } - void resize() { container.resize(G.node_id); } - void resize(T a) { container.resize(G.node_id, a); } + void update() { container.resize(G.node_id); } + void update(T a) { container.resize(G.node_id, a); } }; template @@ -67,8 +67,8 @@ T get(EdgeIt e) const { return container[/*G.id(e)*/e.edge->id]; } T& operator[](EdgeIt e) { return container[/*G.id(e)*/e.edge->id]; } const T& operator[](EdgeIt e) const { return container[/*G.id(e)*/e.edge->id]; } - void resize() { container.resize(G.edge_id); } - void resize(T a) { container.resize(G.edge_id, a); } + void update() { container.resize(G.edge_id); } + void update(T a) { container.resize(G.edge_id, a); } }; int node_id; @@ -306,7 +306,7 @@ bool valid(NodeIt n) const { return n.valid(); } template It next(It it) const { - It tmp(it); return goNext(it); } + It tmp(it); return goNext(tmp); } template It& goNext(It& it) const { return ++it; } @@ -508,46 +508,44 @@ }; - /* - template< typename T > - T ListGraph::first() const { - std::cerr << "Invalid use of template T ListGraph::first();" << std::endl; - return T(); - } +// template< typename T > +// T ListGraph::first() const { +// std::cerr << "Invalid use of template T ListGraph::first();" << std::endl; +// return T(); +// } - template<> - ListGraph::EachNodeIt ListGraph::first() const { - return firstNode(); - } +// template<> +// ListGraph::EachNodeIt ListGraph::first() const { +// return firstNode(); +// } - template<> - ListGraph::EachEdgeIt ListGraph::first() const { - return firstEdge(); - } +// template<> +// ListGraph::EachEdgeIt ListGraph::first() const { +// return firstEdge(); +// } - template< typename T > - T ListGraph::first(ListGraph::NodeIt v) const { - std::cerr << "Invalid use of template T ListGraph::first(ListGRaph::NodeIt);" << std::endl; - return T(); - } +// template< typename T > +// T ListGraph::first(ListGraph::NodeIt v) const { +// std::cerr << "Invalid use of template T ListGraph::first(ListGRaph::NodeIt);" << std::endl; +// return T(); +// } - template<> - ListGraph::OutEdgeIt ListGraph::first(const ListGraph::NodeIt v) const { - return firstOutEdge(v); - } +// template<> +// ListGraph::OutEdgeIt ListGraph::first(const ListGraph::NodeIt v) const { +// return firstOutEdge(v); +// } - template<> - ListGraph::InEdgeIt ListGraph::first(const ListGraph::NodeIt v) const { - return firstInEdge(v); - } +// template<> +// ListGraph::InEdgeIt ListGraph::first(const ListGraph::NodeIt v) const { +// return firstInEdge(v); +// } - template<> - ListGraph::SymEdgeIt ListGraph::first(const ListGraph::NodeIt v) const { - return firstSymEdge(v); - } - */ +// template<> +// ListGraph::SymEdgeIt ListGraph::first(const ListGraph::NodeIt v) const { +// return firstSymEdge(v); +// } -} //namespace marci +} //namespace hugo #endif //LIST_GRAPH_HH