diff -r c7dd9d8c770a -r 62e7d237e1fb lemon/hypercube_graph.h --- a/lemon/hypercube_graph.h Mon Nov 14 18:36:45 2005 +0000 +++ b/lemon/hypercube_graph.h Mon Nov 14 18:38:41 2005 +0000 @@ -21,10 +21,12 @@ #include #include #include +#include #include #include #include +#include ///\ingroup graphs ///\file @@ -32,7 +34,7 @@ namespace lemon { - /// \brief Base graph for HyperGraph. + /// \brief Base graph for HyperCubeGraph. /// /// Base graph for hyper-cube graph. It describes some member functions /// which can be used in the HyperCubeGraph. @@ -77,12 +79,12 @@ /// Maximum node ID. ///\sa id(Node) - int maxId(Node = INVALID) const { return nodeNum() - 1; } + int maxNodeId() const { return nodeNum() - 1; } /// Maximum edge ID. /// Maximum edge ID. ///\sa id(Edge) - int maxId(Edge = INVALID) const { return edgeNum() - 1; } + int maxEdgeId() const { return edgeNum() - 1; } /// \brief Gives back the source node of an edge. /// @@ -118,9 +120,9 @@ ///\return The ID of the edge \c e. static int id(Edge e) { return e.id; } - static Node fromId(int id, Node) { return Node(id);} + static Node nodeFromId(int id) { return Node(id);} - static Edge fromId(int id, Edge) { return Edge(id);} + static Edge edgeFromId(int id) { return Edge(id);} class Node { friend class HyperCubeGraphBase; @@ -235,7 +237,8 @@ typedef StaticMappableGraphExtender< IterableGraphExtender< AlterableGraphExtender< - HyperCubeGraphBase > > > ExtendedHyperCubeGraphBase; + GraphExtender< + HyperCubeGraphBase> > > > ExtendedHyperCubeGraphBase; /// \ingroup graphs /// @@ -307,7 +310,8 @@ HyperMap(const Graph& graph, It begin, It end, T fv = 0.0, const BF& bf = BF()) : _graph(graph), _values(begin, end), _first_value(fv), _bin_func(bf) { - if (_values.size() != graph.dimension()) {} + LEMON_ASSERT(_values.size() != graph.dimension(), + "Wrong size of dimension"); } /// \brief Gives back the partial accumulated value.