1.1 --- a/lemon/graph_utils.h Wed Mar 01 10:04:47 2006 +0000
1.2 +++ b/lemon/graph_utils.h Wed Mar 01 10:17:25 2006 +0000
1.3 @@ -28,7 +28,9 @@
1.4 #include <lemon/utility.h>
1.5 #include <lemon/maps.h>
1.6 #include <lemon/traits.h>
1.7 +
1.8 #include <lemon/bits/alteration_notifier.h>
1.9 +#include <lemon/bits/default_map.h>
1.10
1.11 ///\ingroup gutils
1.12 ///\file
1.13 @@ -900,8 +902,8 @@
1.14 #ifndef DOXYGEN
1.15 /// \param _Map A ReadWriteMap mapping from the item type to integer.
1.16 template <
1.17 - typename _Graph, typename _Item, typename _Value, typename _Map
1.18 - = typename ItemSetTraits<_Graph, _Item>::template Map<_Value>::Parent
1.19 + typename _Graph, typename _Item, typename _Value,
1.20 + typename _Map = DefaultMap<_Graph, _Item, _Value>
1.21 >
1.22 #else
1.23 template <typename _Graph, typename _Item, typename _Value>
1.24 @@ -1105,8 +1107,8 @@
1.25 #ifndef DOXYGEN
1.26 /// \param _Map A ReadWriteMap mapping from the item type to integer.
1.27 template <
1.28 - typename _Graph, typename _Item, typename _Map
1.29 - = typename ItemSetTraits<_Graph, _Item>::template Map<int>::Parent
1.30 + typename _Graph, typename _Item,
1.31 + typename _Map = DefaultMap<_Graph, _Item, int>
1.32 >
1.33 #else
1.34 template <typename _Graph, typename _Item>
1.35 @@ -1505,14 +1507,11 @@
1.36
1.37 private:
1.38
1.39 - class AutoNodeMap : public Graph::template NodeMap<int> {
1.40 + class AutoNodeMap : public DefaultMap<_Graph, Key, int> {
1.41 public:
1.42
1.43 - typedef typename Graph::template NodeMap<int> Parent;
1.44 + typedef DefaultMap<_Graph, Key, int> Parent;
1.45
1.46 - typedef typename Parent::Key Key;
1.47 - typedef typename Parent::Value Value;
1.48 -
1.49 AutoNodeMap(const Graph& graph) : Parent(graph, 0) {}
1.50
1.51 virtual void add(const Key& key) {
1.52 @@ -1622,14 +1621,11 @@
1.53
1.54 private:
1.55
1.56 - class AutoNodeMap : public Graph::template NodeMap<int> {
1.57 + class AutoNodeMap : public DefaultMap<_Graph, Key, int> {
1.58 public:
1.59
1.60 - typedef typename Graph::template NodeMap<int> Parent;
1.61 + typedef DefaultMap<_Graph, Key, int> Parent;
1.62
1.63 - typedef typename Parent::Key Key;
1.64 - typedef typename Parent::Value Value;
1.65 -
1.66 AutoNodeMap(const Graph& graph) : Parent(graph, 0) {}
1.67
1.68 virtual void add(const Key& key) {
1.69 @@ -1663,7 +1659,7 @@
1.70 ObserverBase::detach();
1.71 }
1.72
1.73 - /// Gives back the in-degree of a Node.
1.74 + /// Gives back the out-degree of a Node.
1.75 int operator[](const Key& key) const {
1.76 return deg[key];
1.77 }