Merge
authorAlpar Juttner <alpar@cs.elte.hu>
Thu, 11 Sep 2008 11:10:44 +0100
changeset 260c691064dfd4f
parent 259 362415050b29
parent 258 0310c8984732
child 261 1c2ac7deb5d8
child 262 0181b7f12a2a
child 263 be8a861d3bb7
child 272 e63a95b68827
child 278 931190050520
Merge
     1.1 --- a/lemon/bfs.h	Wed Sep 10 11:23:41 2008 +0100
     1.2 +++ b/lemon/bfs.h	Thu Sep 11 11:10:44 2008 +0100
     1.3 @@ -230,7 +230,7 @@
     1.4      ///@{
     1.5  
     1.6      template <class T>
     1.7 -    struct DefPredMapTraits : public Traits {
     1.8 +    struct SetPredMapTraits : public Traits {
     1.9        typedef T PredMap;
    1.10        static PredMap *createPredMap(const Digraph &)
    1.11        {
    1.12 @@ -243,12 +243,12 @@
    1.13      ///\ref named-templ-param "Named parameter" for setting
    1.14      ///\ref PredMap type.
    1.15      template <class T>
    1.16 -    struct DefPredMap : public Bfs< Digraph, DefPredMapTraits<T> > {
    1.17 -      typedef Bfs< Digraph, DefPredMapTraits<T> > Create;
    1.18 +    struct SetPredMap : public Bfs< Digraph, SetPredMapTraits<T> > {
    1.19 +      typedef Bfs< Digraph, SetPredMapTraits<T> > Create;
    1.20      };
    1.21  
    1.22      template <class T>
    1.23 -    struct DefDistMapTraits : public Traits {
    1.24 +    struct SetDistMapTraits : public Traits {
    1.25        typedef T DistMap;
    1.26        static DistMap *createDistMap(const Digraph &)
    1.27        {
    1.28 @@ -261,12 +261,12 @@
    1.29      ///\ref named-templ-param "Named parameter" for setting
    1.30      ///\ref DistMap type.
    1.31      template <class T>
    1.32 -    struct DefDistMap : public Bfs< Digraph, DefDistMapTraits<T> > {
    1.33 -      typedef Bfs< Digraph, DefDistMapTraits<T> > Create;
    1.34 +    struct SetDistMap : public Bfs< Digraph, SetDistMapTraits<T> > {
    1.35 +      typedef Bfs< Digraph, SetDistMapTraits<T> > Create;
    1.36      };
    1.37  
    1.38      template <class T>
    1.39 -    struct DefReachedMapTraits : public Traits {
    1.40 +    struct SetReachedMapTraits : public Traits {
    1.41        typedef T ReachedMap;
    1.42        static ReachedMap *createReachedMap(const Digraph &)
    1.43        {
    1.44 @@ -279,12 +279,12 @@
    1.45      ///\ref named-templ-param "Named parameter" for setting
    1.46      ///\ref ReachedMap type.
    1.47      template <class T>
    1.48 -    struct DefReachedMap : public Bfs< Digraph, DefReachedMapTraits<T> > {
    1.49 -      typedef Bfs< Digraph, DefReachedMapTraits<T> > Create;
    1.50 +    struct SetReachedMap : public Bfs< Digraph, SetReachedMapTraits<T> > {
    1.51 +      typedef Bfs< Digraph, SetReachedMapTraits<T> > Create;
    1.52      };
    1.53  
    1.54      template <class T>
    1.55 -    struct DefProcessedMapTraits : public Traits {
    1.56 +    struct SetProcessedMapTraits : public Traits {
    1.57        typedef T ProcessedMap;
    1.58        static ProcessedMap *createProcessedMap(const Digraph &)
    1.59        {
    1.60 @@ -297,11 +297,11 @@
    1.61      ///\ref named-templ-param "Named parameter" for setting
    1.62      ///\ref ProcessedMap type.
    1.63      template <class T>
    1.64 -    struct DefProcessedMap : public Bfs< Digraph, DefProcessedMapTraits<T> > {
    1.65 -      typedef Bfs< Digraph, DefProcessedMapTraits<T> > Create;
    1.66 +    struct SetProcessedMap : public Bfs< Digraph, SetProcessedMapTraits<T> > {
    1.67 +      typedef Bfs< Digraph, SetProcessedMapTraits<T> > Create;
    1.68      };
    1.69  
    1.70 -    struct DefDigraphProcessedMapTraits : public Traits {
    1.71 +    struct SetStandardProcessedMapTraits : public Traits {
    1.72        typedef typename Digraph::template NodeMap<bool> ProcessedMap;
    1.73        static ProcessedMap *createProcessedMap(const Digraph &g)
    1.74        {
    1.75 @@ -314,10 +314,9 @@
    1.76      ///\ref named-templ-param "Named parameter" for setting
    1.77      ///\ref ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>.
    1.78      ///If you don't set it explicitly, it will be automatically allocated.
    1.79 -    template <class T>
    1.80 -    struct DefProcessedMapToBeDefaultMap :
    1.81 -      public Bfs< Digraph, DefDigraphProcessedMapTraits> {
    1.82 -      typedef Bfs< Digraph, DefDigraphProcessedMapTraits> Create;
    1.83 +    struct SetStandardProcessedMap :
    1.84 +      public Bfs< Digraph, SetStandardProcessedMapTraits > {
    1.85 +      typedef Bfs< Digraph, SetStandardProcessedMapTraits > Create;
    1.86      };
    1.87  
    1.88      ///@}
    1.89 @@ -1065,10 +1064,10 @@
    1.90      }
    1.91  
    1.92      template<class T>
    1.93 -    struct DefPredMapBase : public Base {
    1.94 +    struct SetPredMapBase : public Base {
    1.95        typedef T PredMap;
    1.96        static PredMap *createPredMap(const Digraph &) { return 0; };
    1.97 -      DefPredMapBase(const TR &b) : TR(b) {}
    1.98 +      SetPredMapBase(const TR &b) : TR(b) {}
    1.99      };
   1.100      ///\brief \ref named-templ-param "Named parameter"
   1.101      ///for setting \ref PredMap object.
   1.102 @@ -1076,17 +1075,17 @@
   1.103      /// \ref named-templ-param "Named parameter"
   1.104      ///for setting \ref PredMap object.
   1.105      template<class T>
   1.106 -    BfsWizard<DefPredMapBase<T> > predMap(const T &t)
   1.107 +    BfsWizard<SetPredMapBase<T> > predMap(const T &t)
   1.108      {
   1.109        Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
   1.110 -      return BfsWizard<DefPredMapBase<T> >(*this);
   1.111 +      return BfsWizard<SetPredMapBase<T> >(*this);
   1.112      }
   1.113  
   1.114      template<class T>
   1.115 -    struct DefReachedMapBase : public Base {
   1.116 +    struct SetReachedMapBase : public Base {
   1.117        typedef T ReachedMap;
   1.118        static ReachedMap *createReachedMap(const Digraph &) { return 0; };
   1.119 -      DefReachedMapBase(const TR &b) : TR(b) {}
   1.120 +      SetReachedMapBase(const TR &b) : TR(b) {}
   1.121      };
   1.122      ///\brief \ref named-templ-param "Named parameter"
   1.123      ///for setting \ref ReachedMap object.
   1.124 @@ -1094,17 +1093,17 @@
   1.125      /// \ref named-templ-param "Named parameter"
   1.126      ///for setting \ref ReachedMap object.
   1.127      template<class T>
   1.128 -    BfsWizard<DefReachedMapBase<T> > reachedMap(const T &t)
   1.129 +    BfsWizard<SetReachedMapBase<T> > reachedMap(const T &t)
   1.130      {
   1.131        Base::_reached=reinterpret_cast<void*>(const_cast<T*>(&t));
   1.132 -      return BfsWizard<DefReachedMapBase<T> >(*this);
   1.133 +      return BfsWizard<SetReachedMapBase<T> >(*this);
   1.134      }
   1.135  
   1.136      template<class T>
   1.137 -    struct DefProcessedMapBase : public Base {
   1.138 +    struct SetProcessedMapBase : public Base {
   1.139        typedef T ProcessedMap;
   1.140        static ProcessedMap *createProcessedMap(const Digraph &) { return 0; };
   1.141 -      DefProcessedMapBase(const TR &b) : TR(b) {}
   1.142 +      SetProcessedMapBase(const TR &b) : TR(b) {}
   1.143      };
   1.144      ///\brief \ref named-templ-param "Named parameter"
   1.145      ///for setting \ref ProcessedMap object.
   1.146 @@ -1112,17 +1111,17 @@
   1.147      /// \ref named-templ-param "Named parameter"
   1.148      ///for setting \ref ProcessedMap object.
   1.149      template<class T>
   1.150 -    BfsWizard<DefProcessedMapBase<T> > processedMap(const T &t)
   1.151 +    BfsWizard<SetProcessedMapBase<T> > processedMap(const T &t)
   1.152      {
   1.153        Base::_processed=reinterpret_cast<void*>(const_cast<T*>(&t));
   1.154 -      return BfsWizard<DefProcessedMapBase<T> >(*this);
   1.155 +      return BfsWizard<SetProcessedMapBase<T> >(*this);
   1.156      }
   1.157  
   1.158      template<class T>
   1.159 -    struct DefDistMapBase : public Base {
   1.160 +    struct SetDistMapBase : public Base {
   1.161        typedef T DistMap;
   1.162        static DistMap *createDistMap(const Digraph &) { return 0; };
   1.163 -      DefDistMapBase(const TR &b) : TR(b) {}
   1.164 +      SetDistMapBase(const TR &b) : TR(b) {}
   1.165      };
   1.166      ///\brief \ref named-templ-param "Named parameter"
   1.167      ///for setting \ref DistMap object.
   1.168 @@ -1130,10 +1129,10 @@
   1.169      /// \ref named-templ-param "Named parameter"
   1.170      ///for setting \ref DistMap object.
   1.171      template<class T>
   1.172 -    BfsWizard<DefDistMapBase<T> > distMap(const T &t)
   1.173 +    BfsWizard<SetDistMapBase<T> > distMap(const T &t)
   1.174      {
   1.175        Base::_dist=reinterpret_cast<void*>(const_cast<T*>(&t));
   1.176 -      return BfsWizard<DefDistMapBase<T> >(*this);
   1.177 +      return BfsWizard<SetDistMapBase<T> >(*this);
   1.178      }
   1.179  
   1.180    };
   1.181 @@ -1354,7 +1353,7 @@
   1.182  
   1.183      ///@{
   1.184      template <class T>
   1.185 -    struct DefReachedMapTraits : public Traits {
   1.186 +    struct SetReachedMapTraits : public Traits {
   1.187        typedef T ReachedMap;
   1.188        static ReachedMap *createReachedMap(const Digraph &digraph) {
   1.189          throw UninitializedParameter();
   1.190 @@ -1365,9 +1364,9 @@
   1.191      ///
   1.192      /// \ref named-templ-param "Named parameter" for setting ReachedMap type.
   1.193      template <class T>
   1.194 -    struct DefReachedMap : public BfsVisit< Digraph, Visitor,
   1.195 -                                            DefReachedMapTraits<T> > {
   1.196 -      typedef BfsVisit< Digraph, Visitor, DefReachedMapTraits<T> > Create;
   1.197 +    struct SetReachedMap : public BfsVisit< Digraph, Visitor,
   1.198 +                                            SetReachedMapTraits<T> > {
   1.199 +      typedef BfsVisit< Digraph, Visitor, SetReachedMapTraits<T> > Create;
   1.200      };
   1.201      ///@}
   1.202  
     2.1 --- a/lemon/bits/base_extender.h	Wed Sep 10 11:23:41 2008 +0100
     2.2 +++ b/lemon/bits/base_extender.h	Thu Sep 11 11:10:44 2008 +0100
     2.3 @@ -59,7 +59,7 @@
     2.4      public:
     2.5        Arc() {}
     2.6  
     2.7 -      /// Invalid arc constructor
     2.8 +      // Invalid arc constructor
     2.9        Arc(Invalid i) : Edge(i), forward(true) {}
    2.10  
    2.11        bool operator==(const Arc &that) const {
    2.12 @@ -74,38 +74,41 @@
    2.13        }
    2.14      };
    2.15  
    2.16 +    /// First node of the edge
    2.17 +    Node u(const Edge &e) const {
    2.18 +      return Parent::source(e);
    2.19 +    }
    2.20  
    2.21 -
    2.22 -    using Parent::source;
    2.23 -
    2.24 -    /// Source of the given Arc.
    2.25 +    /// Source of the given arc
    2.26      Node source(const Arc &e) const {
    2.27        return e.forward ? Parent::source(e) : Parent::target(e);
    2.28      }
    2.29  
    2.30 -    using Parent::target;
    2.31 +    /// Second node of the edge
    2.32 +    Node v(const Edge &e) const {
    2.33 +      return Parent::target(e);
    2.34 +    }
    2.35  
    2.36 -    /// Target of the given Arc.
    2.37 +    /// Target of the given arc
    2.38      Node target(const Arc &e) const {
    2.39        return e.forward ? Parent::target(e) : Parent::source(e);
    2.40      }
    2.41  
    2.42      /// \brief Directed arc from an edge.
    2.43      ///
    2.44 -    /// Returns a directed arc corresponding to the specified Edge.
    2.45 -    /// If the given bool is true the given edge and the
    2.46 -    /// returned arc have the same source node.
    2.47 -    static Arc direct(const Edge &ue, bool d) {
    2.48 -      return Arc(ue, d);
    2.49 +    /// Returns a directed arc corresponding to the specified edge.
    2.50 +    /// If the given bool is true, the first node of the given edge and
    2.51 +    /// the source node of the returned arc are the same.
    2.52 +    static Arc direct(const Edge &e, bool d) {
    2.53 +      return Arc(e, d);
    2.54      }
    2.55  
    2.56 -    /// Returns whether the given directed arc is same orientation as the
    2.57 -    /// corresponding edge.
    2.58 +    /// Returns whether the given directed arc has the same orientation
    2.59 +    /// as the corresponding edge.
    2.60      ///
    2.61      /// \todo reference to the corresponding point of the undirected digraph
    2.62      /// concept. "What does the direction of an edge mean?"
    2.63 -    static bool direction(const Arc &e) { return e.forward; }
    2.64 -
    2.65 +    static bool direction(const Arc &a) { return a.forward; }
    2.66  
    2.67      using Parent::first;
    2.68      using Parent::next;
    2.69 @@ -229,7 +232,6 @@
    2.70        return Parent::maxArcId();
    2.71      }
    2.72  
    2.73 -
    2.74      int arcNum() const {
    2.75        return 2 * Parent::arcNum();
    2.76      }
     3.1 --- a/lemon/dfs.h	Wed Sep 10 11:23:41 2008 +0100
     3.2 +++ b/lemon/dfs.h	Thu Sep 11 11:10:44 2008 +0100
     3.3 @@ -230,7 +230,7 @@
     3.4      ///@{
     3.5  
     3.6      template <class T>
     3.7 -    struct DefPredMapTraits : public Traits {
     3.8 +    struct SetPredMapTraits : public Traits {
     3.9        typedef T PredMap;
    3.10        static PredMap *createPredMap(const Digraph &)
    3.11        {
    3.12 @@ -243,12 +243,12 @@
    3.13      ///\ref named-templ-param "Named parameter" for setting
    3.14      ///\ref PredMap type.
    3.15      template <class T>
    3.16 -    struct DefPredMap : public Dfs<Digraph, DefPredMapTraits<T> > {
    3.17 -      typedef Dfs<Digraph, DefPredMapTraits<T> > Create;
    3.18 +    struct SetPredMap : public Dfs<Digraph, SetPredMapTraits<T> > {
    3.19 +      typedef Dfs<Digraph, SetPredMapTraits<T> > Create;
    3.20      };
    3.21  
    3.22      template <class T>
    3.23 -    struct DefDistMapTraits : public Traits {
    3.24 +    struct SetDistMapTraits : public Traits {
    3.25        typedef T DistMap;
    3.26        static DistMap *createDistMap(const Digraph &)
    3.27        {
    3.28 @@ -261,12 +261,12 @@
    3.29      ///\ref named-templ-param "Named parameter" for setting
    3.30      ///\ref DistMap type.
    3.31      template <class T>
    3.32 -    struct DefDistMap : public Dfs< Digraph, DefDistMapTraits<T> > {
    3.33 -      typedef Dfs<Digraph, DefDistMapTraits<T> > Create;
    3.34 +    struct SetDistMap : public Dfs< Digraph, SetDistMapTraits<T> > {
    3.35 +      typedef Dfs<Digraph, SetDistMapTraits<T> > Create;
    3.36      };
    3.37  
    3.38      template <class T>
    3.39 -    struct DefReachedMapTraits : public Traits {
    3.40 +    struct SetReachedMapTraits : public Traits {
    3.41        typedef T ReachedMap;
    3.42        static ReachedMap *createReachedMap(const Digraph &)
    3.43        {
    3.44 @@ -279,12 +279,12 @@
    3.45      ///\ref named-templ-param "Named parameter" for setting
    3.46      ///\ref ReachedMap type.
    3.47      template <class T>
    3.48 -    struct DefReachedMap : public Dfs< Digraph, DefReachedMapTraits<T> > {
    3.49 -      typedef Dfs< Digraph, DefReachedMapTraits<T> > Create;
    3.50 +    struct SetReachedMap : public Dfs< Digraph, SetReachedMapTraits<T> > {
    3.51 +      typedef Dfs< Digraph, SetReachedMapTraits<T> > Create;
    3.52      };
    3.53  
    3.54      template <class T>
    3.55 -    struct DefProcessedMapTraits : public Traits {
    3.56 +    struct SetProcessedMapTraits : public Traits {
    3.57        typedef T ProcessedMap;
    3.58        static ProcessedMap *createProcessedMap(const Digraph &)
    3.59        {
    3.60 @@ -297,11 +297,11 @@
    3.61      ///\ref named-templ-param "Named parameter" for setting
    3.62      ///\ref ProcessedMap type.
    3.63      template <class T>
    3.64 -    struct DefProcessedMap : public Dfs< Digraph, DefProcessedMapTraits<T> > {
    3.65 -      typedef Dfs< Digraph, DefProcessedMapTraits<T> > Create;
    3.66 +    struct SetProcessedMap : public Dfs< Digraph, SetProcessedMapTraits<T> > {
    3.67 +      typedef Dfs< Digraph, SetProcessedMapTraits<T> > Create;
    3.68      };
    3.69  
    3.70 -    struct DefDigraphProcessedMapTraits : public Traits {
    3.71 +    struct SetStandardProcessedMapTraits : public Traits {
    3.72        typedef typename Digraph::template NodeMap<bool> ProcessedMap;
    3.73        static ProcessedMap *createProcessedMap(const Digraph &g)
    3.74        {
    3.75 @@ -314,10 +314,9 @@
    3.76      ///\ref named-templ-param "Named parameter" for setting
    3.77      ///\ref ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>.
    3.78      ///If you don't set it explicitly, it will be automatically allocated.
    3.79 -    template <class T>
    3.80 -    struct DefProcessedMapToBeDefaultMap :
    3.81 -      public Dfs< Digraph, DefDigraphProcessedMapTraits> {
    3.82 -      typedef Dfs< Digraph, DefDigraphProcessedMapTraits> Create;
    3.83 +    struct SetStandardProcessedMap :
    3.84 +      public Dfs< Digraph, SetStandardProcessedMapTraits > {
    3.85 +      typedef Dfs< Digraph, SetStandardProcessedMapTraits > Create;
    3.86      };
    3.87  
    3.88      ///@}
    3.89 @@ -1000,10 +999,10 @@
    3.90      }
    3.91  
    3.92      template<class T>
    3.93 -    struct DefPredMapBase : public Base {
    3.94 +    struct SetPredMapBase : public Base {
    3.95        typedef T PredMap;
    3.96        static PredMap *createPredMap(const Digraph &) { return 0; };
    3.97 -      DefPredMapBase(const TR &b) : TR(b) {}
    3.98 +      SetPredMapBase(const TR &b) : TR(b) {}
    3.99      };
   3.100      ///\brief \ref named-templ-param "Named parameter"
   3.101      ///for setting \ref PredMap object.
   3.102 @@ -1011,17 +1010,17 @@
   3.103      ///\ref named-templ-param "Named parameter"
   3.104      ///for setting \ref PredMap object.
   3.105      template<class T>
   3.106 -    DfsWizard<DefPredMapBase<T> > predMap(const T &t)
   3.107 +    DfsWizard<SetPredMapBase<T> > predMap(const T &t)
   3.108      {
   3.109        Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
   3.110 -      return DfsWizard<DefPredMapBase<T> >(*this);
   3.111 +      return DfsWizard<SetPredMapBase<T> >(*this);
   3.112      }
   3.113  
   3.114      template<class T>
   3.115 -    struct DefReachedMapBase : public Base {
   3.116 +    struct SetReachedMapBase : public Base {
   3.117        typedef T ReachedMap;
   3.118        static ReachedMap *createReachedMap(const Digraph &) { return 0; };
   3.119 -      DefReachedMapBase(const TR &b) : TR(b) {}
   3.120 +      SetReachedMapBase(const TR &b) : TR(b) {}
   3.121      };
   3.122      ///\brief \ref named-templ-param "Named parameter"
   3.123      ///for setting \ref ReachedMap object.
   3.124 @@ -1029,17 +1028,17 @@
   3.125      /// \ref named-templ-param "Named parameter"
   3.126      ///for setting \ref ReachedMap object.
   3.127      template<class T>
   3.128 -    DfsWizard<DefReachedMapBase<T> > reachedMap(const T &t)
   3.129 +    DfsWizard<SetReachedMapBase<T> > reachedMap(const T &t)
   3.130      {
   3.131        Base::_reached=reinterpret_cast<void*>(const_cast<T*>(&t));
   3.132 -      return DfsWizard<DefReachedMapBase<T> >(*this);
   3.133 +      return DfsWizard<SetReachedMapBase<T> >(*this);
   3.134      }
   3.135  
   3.136      template<class T>
   3.137 -    struct DefProcessedMapBase : public Base {
   3.138 +    struct SetProcessedMapBase : public Base {
   3.139        typedef T ProcessedMap;
   3.140        static ProcessedMap *createProcessedMap(const Digraph &) { return 0; };
   3.141 -      DefProcessedMapBase(const TR &b) : TR(b) {}
   3.142 +      SetProcessedMapBase(const TR &b) : TR(b) {}
   3.143      };
   3.144      ///\brief \ref named-templ-param "Named parameter"
   3.145      ///for setting \ref ProcessedMap object.
   3.146 @@ -1047,17 +1046,17 @@
   3.147      /// \ref named-templ-param "Named parameter"
   3.148      ///for setting \ref ProcessedMap object.
   3.149      template<class T>
   3.150 -    DfsWizard<DefProcessedMapBase<T> > processedMap(const T &t)
   3.151 +    DfsWizard<SetProcessedMapBase<T> > processedMap(const T &t)
   3.152      {
   3.153        Base::_processed=reinterpret_cast<void*>(const_cast<T*>(&t));
   3.154 -      return DfsWizard<DefProcessedMapBase<T> >(*this);
   3.155 +      return DfsWizard<SetProcessedMapBase<T> >(*this);
   3.156      }
   3.157  
   3.158      template<class T>
   3.159 -    struct DefDistMapBase : public Base {
   3.160 +    struct SetDistMapBase : public Base {
   3.161        typedef T DistMap;
   3.162        static DistMap *createDistMap(const Digraph &) { return 0; };
   3.163 -      DefDistMapBase(const TR &b) : TR(b) {}
   3.164 +      SetDistMapBase(const TR &b) : TR(b) {}
   3.165      };
   3.166      ///\brief \ref named-templ-param "Named parameter"
   3.167      ///for setting \ref DistMap object.
   3.168 @@ -1065,10 +1064,10 @@
   3.169      ///\ref named-templ-param "Named parameter"
   3.170      ///for setting \ref DistMap object.
   3.171      template<class T>
   3.172 -    DfsWizard<DefDistMapBase<T> > distMap(const T &t)
   3.173 +    DfsWizard<SetDistMapBase<T> > distMap(const T &t)
   3.174      {
   3.175        Base::_dist=reinterpret_cast<void*>(const_cast<T*>(&t));
   3.176 -      return DfsWizard<DefDistMapBase<T> >(*this);
   3.177 +      return DfsWizard<SetDistMapBase<T> >(*this);
   3.178      }
   3.179  
   3.180    };
   3.181 @@ -1301,7 +1300,7 @@
   3.182  
   3.183      ///@{
   3.184      template <class T>
   3.185 -    struct DefReachedMapTraits : public Traits {
   3.186 +    struct SetReachedMapTraits : public Traits {
   3.187        typedef T ReachedMap;
   3.188        static ReachedMap *createReachedMap(const Digraph &digraph) {
   3.189          throw UninitializedParameter();
   3.190 @@ -1312,9 +1311,9 @@
   3.191      ///
   3.192      /// \ref named-templ-param "Named parameter" for setting ReachedMap type.
   3.193      template <class T>
   3.194 -    struct DefReachedMap : public DfsVisit< Digraph, Visitor,
   3.195 -                                            DefReachedMapTraits<T> > {
   3.196 -      typedef DfsVisit< Digraph, Visitor, DefReachedMapTraits<T> > Create;
   3.197 +    struct SetReachedMap : public DfsVisit< Digraph, Visitor,
   3.198 +                                            SetReachedMapTraits<T> > {
   3.199 +      typedef DfsVisit< Digraph, Visitor, SetReachedMapTraits<T> > Create;
   3.200      };
   3.201      ///@}
   3.202  
     4.1 --- a/lemon/dijkstra.h	Wed Sep 10 11:23:41 2008 +0100
     4.2 +++ b/lemon/dijkstra.h	Thu Sep 11 11:10:44 2008 +0100
     4.3 @@ -331,7 +331,7 @@
     4.4      ///@{
     4.5  
     4.6      template <class T>
     4.7 -    struct DefPredMapTraits : public Traits {
     4.8 +    struct SetPredMapTraits : public Traits {
     4.9        typedef T PredMap;
    4.10        static PredMap *createPredMap(const Digraph &)
    4.11        {
    4.12 @@ -344,13 +344,13 @@
    4.13      ///\ref named-templ-param "Named parameter" for setting
    4.14      ///\ref PredMap type.
    4.15      template <class T>
    4.16 -    struct DefPredMap
    4.17 -      : public Dijkstra< Digraph, LengthMap, DefPredMapTraits<T> > {
    4.18 -      typedef Dijkstra< Digraph, LengthMap, DefPredMapTraits<T> > Create;
    4.19 +    struct SetPredMap
    4.20 +      : public Dijkstra< Digraph, LengthMap, SetPredMapTraits<T> > {
    4.21 +      typedef Dijkstra< Digraph, LengthMap, SetPredMapTraits<T> > Create;
    4.22      };
    4.23  
    4.24      template <class T>
    4.25 -    struct DefDistMapTraits : public Traits {
    4.26 +    struct SetDistMapTraits : public Traits {
    4.27        typedef T DistMap;
    4.28        static DistMap *createDistMap(const Digraph &)
    4.29        {
    4.30 @@ -363,13 +363,13 @@
    4.31      ///\ref named-templ-param "Named parameter" for setting
    4.32      ///\ref DistMap type.
    4.33      template <class T>
    4.34 -    struct DefDistMap
    4.35 -      : public Dijkstra< Digraph, LengthMap, DefDistMapTraits<T> > {
    4.36 -      typedef Dijkstra< Digraph, LengthMap, DefDistMapTraits<T> > Create;
    4.37 +    struct SetDistMap
    4.38 +      : public Dijkstra< Digraph, LengthMap, SetDistMapTraits<T> > {
    4.39 +      typedef Dijkstra< Digraph, LengthMap, SetDistMapTraits<T> > Create;
    4.40      };
    4.41  
    4.42      template <class T>
    4.43 -    struct DefProcessedMapTraits : public Traits {
    4.44 +    struct SetProcessedMapTraits : public Traits {
    4.45        typedef T ProcessedMap;
    4.46        static ProcessedMap *createProcessedMap(const Digraph &)
    4.47        {
    4.48 @@ -382,12 +382,12 @@
    4.49      ///\ref named-templ-param "Named parameter" for setting
    4.50      ///\ref ProcessedMap type.
    4.51      template <class T>
    4.52 -    struct DefProcessedMap
    4.53 -      : public Dijkstra< Digraph, LengthMap, DefProcessedMapTraits<T> > {
    4.54 -      typedef Dijkstra< Digraph, LengthMap, DefProcessedMapTraits<T> > Create;
    4.55 +    struct SetProcessedMap
    4.56 +      : public Dijkstra< Digraph, LengthMap, SetProcessedMapTraits<T> > {
    4.57 +      typedef Dijkstra< Digraph, LengthMap, SetProcessedMapTraits<T> > Create;
    4.58      };
    4.59  
    4.60 -    struct DefDigraphProcessedMapTraits : public Traits {
    4.61 +    struct SetStandardProcessedMapTraits : public Traits {
    4.62        typedef typename Digraph::template NodeMap<bool> ProcessedMap;
    4.63        static ProcessedMap *createProcessedMap(const Digraph &g)
    4.64        {
    4.65 @@ -400,15 +400,14 @@
    4.66      ///\ref named-templ-param "Named parameter" for setting
    4.67      ///\ref ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>.
    4.68      ///If you don't set it explicitly, it will be automatically allocated.
    4.69 -    template <class T>
    4.70 -    struct DefProcessedMapToBeDefaultMap
    4.71 -      : public Dijkstra< Digraph, LengthMap, DefDigraphProcessedMapTraits> {
    4.72 -      typedef Dijkstra< Digraph, LengthMap, DefDigraphProcessedMapTraits>
    4.73 +    struct SetStandardProcessedMap
    4.74 +      : public Dijkstra< Digraph, LengthMap, SetStandardProcessedMapTraits > {
    4.75 +      typedef Dijkstra< Digraph, LengthMap, SetStandardProcessedMapTraits >
    4.76        Create;
    4.77      };
    4.78  
    4.79      template <class H, class CR>
    4.80 -    struct DefHeapTraits : public Traits {
    4.81 +    struct SetHeapTraits : public Traits {
    4.82        typedef CR HeapCrossRef;
    4.83        typedef H Heap;
    4.84        static HeapCrossRef *createHeapCrossRef(const Digraph &) {
    4.85 @@ -425,13 +424,13 @@
    4.86      ///\ref named-templ-param "Named parameter" for setting heap and cross
    4.87      ///reference type.
    4.88      template <class H, class CR = typename Digraph::template NodeMap<int> >
    4.89 -    struct DefHeap
    4.90 -      : public Dijkstra< Digraph, LengthMap, DefHeapTraits<H, CR> > {
    4.91 -      typedef Dijkstra< Digraph, LengthMap, DefHeapTraits<H, CR> > Create;
    4.92 +    struct SetHeap
    4.93 +      : public Dijkstra< Digraph, LengthMap, SetHeapTraits<H, CR> > {
    4.94 +      typedef Dijkstra< Digraph, LengthMap, SetHeapTraits<H, CR> > Create;
    4.95      };
    4.96  
    4.97      template <class H, class CR>
    4.98 -    struct DefStandardHeapTraits : public Traits {
    4.99 +    struct SetStandardHeapTraits : public Traits {
   4.100        typedef CR HeapCrossRef;
   4.101        typedef H Heap;
   4.102        static HeapCrossRef *createHeapCrossRef(const Digraph &G) {
   4.103 @@ -450,14 +449,14 @@
   4.104      ///object if the cross reference's constructor waits for the digraph as
   4.105      ///parameter and the heap's constructor waits for the cross reference.
   4.106      template <class H, class CR = typename Digraph::template NodeMap<int> >
   4.107 -    struct DefStandardHeap
   4.108 -      : public Dijkstra< Digraph, LengthMap, DefStandardHeapTraits<H, CR> > {
   4.109 -      typedef Dijkstra< Digraph, LengthMap, DefStandardHeapTraits<H, CR> >
   4.110 +    struct SetStandardHeap
   4.111 +      : public Dijkstra< Digraph, LengthMap, SetStandardHeapTraits<H, CR> > {
   4.112 +      typedef Dijkstra< Digraph, LengthMap, SetStandardHeapTraits<H, CR> >
   4.113        Create;
   4.114      };
   4.115  
   4.116      template <class T>
   4.117 -    struct DefOperationTraitsTraits : public Traits {
   4.118 +    struct SetOperationTraitsTraits : public Traits {
   4.119        typedef T OperationTraits;
   4.120      };
   4.121  
   4.122 @@ -467,9 +466,9 @@
   4.123      ///\ref named-templ-param "Named parameter" for setting
   4.124      ///\ref OperationTraits type.
   4.125      template <class T>
   4.126 -    struct DefOperationTraits
   4.127 -      : public Dijkstra<Digraph, LengthMap, DefOperationTraitsTraits<T> > {
   4.128 -      typedef Dijkstra<Digraph, LengthMap, DefOperationTraitsTraits<T> >
   4.129 +    struct SetOperationTraits
   4.130 +      : public Dijkstra<Digraph, LengthMap, SetOperationTraitsTraits<T> > {
   4.131 +      typedef Dijkstra<Digraph, LengthMap, SetOperationTraitsTraits<T> >
   4.132        Create;
   4.133      };
   4.134  
   4.135 @@ -1205,10 +1204,10 @@
   4.136      }
   4.137  
   4.138      template<class T>
   4.139 -    struct DefPredMapBase : public Base {
   4.140 +    struct SetPredMapBase : public Base {
   4.141        typedef T PredMap;
   4.142        static PredMap *createPredMap(const Digraph &) { return 0; };
   4.143 -      DefPredMapBase(const TR &b) : TR(b) {}
   4.144 +      SetPredMapBase(const TR &b) : TR(b) {}
   4.145      };
   4.146      ///\brief \ref named-templ-param "Named parameter"
   4.147      ///for setting \ref PredMap object.
   4.148 @@ -1216,17 +1215,17 @@
   4.149      ///\ref named-templ-param "Named parameter"
   4.150      ///for setting \ref PredMap object.
   4.151      template<class T>
   4.152 -    DijkstraWizard<DefPredMapBase<T> > predMap(const T &t)
   4.153 +    DijkstraWizard<SetPredMapBase<T> > predMap(const T &t)
   4.154      {
   4.155        Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
   4.156 -      return DijkstraWizard<DefPredMapBase<T> >(*this);
   4.157 +      return DijkstraWizard<SetPredMapBase<T> >(*this);
   4.158      }
   4.159  
   4.160      template<class T>
   4.161 -    struct DefProcessedMapBase : public Base {
   4.162 +    struct SetProcessedMapBase : public Base {
   4.163        typedef T ProcessedMap;
   4.164        static ProcessedMap *createProcessedMap(const Digraph &) { return 0; };
   4.165 -      DefProcessedMapBase(const TR &b) : TR(b) {}
   4.166 +      SetProcessedMapBase(const TR &b) : TR(b) {}
   4.167      };
   4.168      ///\brief \ref named-templ-param "Named parameter"
   4.169      ///for setting \ref ProcessedMap object.
   4.170 @@ -1234,17 +1233,17 @@
   4.171      /// \ref named-templ-param "Named parameter"
   4.172      ///for setting \ref ProcessedMap object.
   4.173      template<class T>
   4.174 -    DijkstraWizard<DefProcessedMapBase<T> > processedMap(const T &t)
   4.175 +    DijkstraWizard<SetProcessedMapBase<T> > processedMap(const T &t)
   4.176      {
   4.177        Base::_processed=reinterpret_cast<void*>(const_cast<T*>(&t));
   4.178 -      return DijkstraWizard<DefProcessedMapBase<T> >(*this);
   4.179 +      return DijkstraWizard<SetProcessedMapBase<T> >(*this);
   4.180      }
   4.181  
   4.182      template<class T>
   4.183 -    struct DefDistMapBase : public Base {
   4.184 +    struct SetDistMapBase : public Base {
   4.185        typedef T DistMap;
   4.186        static DistMap *createDistMap(const Digraph &) { return 0; };
   4.187 -      DefDistMapBase(const TR &b) : TR(b) {}
   4.188 +      SetDistMapBase(const TR &b) : TR(b) {}
   4.189      };
   4.190      ///\brief \ref named-templ-param "Named parameter"
   4.191      ///for setting \ref DistMap object.
   4.192 @@ -1252,10 +1251,10 @@
   4.193      ///\ref named-templ-param "Named parameter"
   4.194      ///for setting \ref DistMap object.
   4.195      template<class T>
   4.196 -    DijkstraWizard<DefDistMapBase<T> > distMap(const T &t)
   4.197 +    DijkstraWizard<SetDistMapBase<T> > distMap(const T &t)
   4.198      {
   4.199        Base::_dist=reinterpret_cast<void*>(const_cast<T*>(&t));
   4.200 -      return DijkstraWizard<DefDistMapBase<T> >(*this);
   4.201 +      return DijkstraWizard<SetDistMapBase<T> >(*this);
   4.202      }
   4.203  
   4.204    };
     5.1 --- a/test/heap_test.cc	Wed Sep 10 11:23:41 2008 +0100
     5.2 +++ b/test/heap_test.cc	Thu Sep 11 11:10:44 2008 +0100
     5.3 @@ -131,7 +131,7 @@
     5.4  void dijkstraHeapTest(const Digraph& digraph, const IntArcMap& length,
     5.5                        Node source) {
     5.6  
     5.7 -  typename Dijkstra<Digraph, IntArcMap>::template DefStandardHeap<Heap>::
     5.8 +  typename Dijkstra<Digraph, IntArcMap>::template SetStandardHeap<Heap>::
     5.9      Create dijkstra(digraph, length);
    5.10  
    5.11    dijkstra.run(source);