COIN-OR::LEMON - Graph Library

Changes in / [259:362415050b29:260:c691064dfd4f] in lemon-1.0


Ignore:
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • lemon/bfs.h

    r252 r258  
    231231
    232232    template <class T>
    233     struct DefPredMapTraits : public Traits {
     233    struct SetPredMapTraits : public Traits {
    234234      typedef T PredMap;
    235235      static PredMap *createPredMap(const Digraph &)
     
    244244    ///\ref PredMap type.
    245245    template <class T>
    246     struct DefPredMap : public Bfs< Digraph, DefPredMapTraits<T> > {
    247       typedef Bfs< Digraph, DefPredMapTraits<T> > Create;
     246    struct SetPredMap : public Bfs< Digraph, SetPredMapTraits<T> > {
     247      typedef Bfs< Digraph, SetPredMapTraits<T> > Create;
    248248    };
    249249
    250250    template <class T>
    251     struct DefDistMapTraits : public Traits {
     251    struct SetDistMapTraits : public Traits {
    252252      typedef T DistMap;
    253253      static DistMap *createDistMap(const Digraph &)
     
    262262    ///\ref DistMap type.
    263263    template <class T>
    264     struct DefDistMap : public Bfs< Digraph, DefDistMapTraits<T> > {
    265       typedef Bfs< Digraph, DefDistMapTraits<T> > Create;
     264    struct SetDistMap : public Bfs< Digraph, SetDistMapTraits<T> > {
     265      typedef Bfs< Digraph, SetDistMapTraits<T> > Create;
    266266    };
    267267
    268268    template <class T>
    269     struct DefReachedMapTraits : public Traits {
     269    struct SetReachedMapTraits : public Traits {
    270270      typedef T ReachedMap;
    271271      static ReachedMap *createReachedMap(const Digraph &)
     
    280280    ///\ref ReachedMap type.
    281281    template <class T>
    282     struct DefReachedMap : public Bfs< Digraph, DefReachedMapTraits<T> > {
    283       typedef Bfs< Digraph, DefReachedMapTraits<T> > Create;
     282    struct SetReachedMap : public Bfs< Digraph, SetReachedMapTraits<T> > {
     283      typedef Bfs< Digraph, SetReachedMapTraits<T> > Create;
    284284    };
    285285
    286286    template <class T>
    287     struct DefProcessedMapTraits : public Traits {
     287    struct SetProcessedMapTraits : public Traits {
    288288      typedef T ProcessedMap;
    289289      static ProcessedMap *createProcessedMap(const Digraph &)
     
    298298    ///\ref ProcessedMap type.
    299299    template <class T>
    300     struct DefProcessedMap : public Bfs< Digraph, DefProcessedMapTraits<T> > {
    301       typedef Bfs< Digraph, DefProcessedMapTraits<T> > Create;
    302     };
    303 
    304     struct DefDigraphProcessedMapTraits : public Traits {
     300    struct SetProcessedMap : public Bfs< Digraph, SetProcessedMapTraits<T> > {
     301      typedef Bfs< Digraph, SetProcessedMapTraits<T> > Create;
     302    };
     303
     304    struct SetStandardProcessedMapTraits : public Traits {
    305305      typedef typename Digraph::template NodeMap<bool> ProcessedMap;
    306306      static ProcessedMap *createProcessedMap(const Digraph &g)
     
    315315    ///\ref ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>.
    316316    ///If you don't set it explicitly, it will be automatically allocated.
    317     template <class T>
    318     struct DefProcessedMapToBeDefaultMap :
    319       public Bfs< Digraph, DefDigraphProcessedMapTraits> {
    320       typedef Bfs< Digraph, DefDigraphProcessedMapTraits> Create;
     317    struct SetStandardProcessedMap :
     318      public Bfs< Digraph, SetStandardProcessedMapTraits > {
     319      typedef Bfs< Digraph, SetStandardProcessedMapTraits > Create;
    321320    };
    322321
     
    10661065
    10671066    template<class T>
    1068     struct DefPredMapBase : public Base {
     1067    struct SetPredMapBase : public Base {
    10691068      typedef T PredMap;
    10701069      static PredMap *createPredMap(const Digraph &) { return 0; };
    1071       DefPredMapBase(const TR &b) : TR(b) {}
     1070      SetPredMapBase(const TR &b) : TR(b) {}
    10721071    };
    10731072    ///\brief \ref named-templ-param "Named parameter"
     
    10771076    ///for setting \ref PredMap object.
    10781077    template<class T>
    1079     BfsWizard<DefPredMapBase<T> > predMap(const T &t)
     1078    BfsWizard<SetPredMapBase<T> > predMap(const T &t)
    10801079    {
    10811080      Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
    1082       return BfsWizard<DefPredMapBase<T> >(*this);
     1081      return BfsWizard<SetPredMapBase<T> >(*this);
    10831082    }
    10841083
    10851084    template<class T>
    1086     struct DefReachedMapBase : public Base {
     1085    struct SetReachedMapBase : public Base {
    10871086      typedef T ReachedMap;
    10881087      static ReachedMap *createReachedMap(const Digraph &) { return 0; };
    1089       DefReachedMapBase(const TR &b) : TR(b) {}
     1088      SetReachedMapBase(const TR &b) : TR(b) {}
    10901089    };
    10911090    ///\brief \ref named-templ-param "Named parameter"
     
    10951094    ///for setting \ref ReachedMap object.
    10961095    template<class T>
    1097     BfsWizard<DefReachedMapBase<T> > reachedMap(const T &t)
     1096    BfsWizard<SetReachedMapBase<T> > reachedMap(const T &t)
    10981097    {
    10991098      Base::_reached=reinterpret_cast<void*>(const_cast<T*>(&t));
    1100       return BfsWizard<DefReachedMapBase<T> >(*this);
     1099      return BfsWizard<SetReachedMapBase<T> >(*this);
    11011100    }
    11021101
    11031102    template<class T>
    1104     struct DefProcessedMapBase : public Base {
     1103    struct SetProcessedMapBase : public Base {
    11051104      typedef T ProcessedMap;
    11061105      static ProcessedMap *createProcessedMap(const Digraph &) { return 0; };
    1107       DefProcessedMapBase(const TR &b) : TR(b) {}
     1106      SetProcessedMapBase(const TR &b) : TR(b) {}
    11081107    };
    11091108    ///\brief \ref named-templ-param "Named parameter"
     
    11131112    ///for setting \ref ProcessedMap object.
    11141113    template<class T>
    1115     BfsWizard<DefProcessedMapBase<T> > processedMap(const T &t)
     1114    BfsWizard<SetProcessedMapBase<T> > processedMap(const T &t)
    11161115    {
    11171116      Base::_processed=reinterpret_cast<void*>(const_cast<T*>(&t));
    1118       return BfsWizard<DefProcessedMapBase<T> >(*this);
     1117      return BfsWizard<SetProcessedMapBase<T> >(*this);
    11191118    }
    11201119
    11211120    template<class T>
    1122     struct DefDistMapBase : public Base {
     1121    struct SetDistMapBase : public Base {
    11231122      typedef T DistMap;
    11241123      static DistMap *createDistMap(const Digraph &) { return 0; };
    1125       DefDistMapBase(const TR &b) : TR(b) {}
     1124      SetDistMapBase(const TR &b) : TR(b) {}
    11261125    };
    11271126    ///\brief \ref named-templ-param "Named parameter"
     
    11311130    ///for setting \ref DistMap object.
    11321131    template<class T>
    1133     BfsWizard<DefDistMapBase<T> > distMap(const T &t)
     1132    BfsWizard<SetDistMapBase<T> > distMap(const T &t)
    11341133    {
    11351134      Base::_dist=reinterpret_cast<void*>(const_cast<T*>(&t));
    1136       return BfsWizard<DefDistMapBase<T> >(*this);
     1135      return BfsWizard<SetDistMapBase<T> >(*this);
    11371136    }
    11381137
     
    13551354    ///@{
    13561355    template <class T>
    1357     struct DefReachedMapTraits : public Traits {
     1356    struct SetReachedMapTraits : public Traits {
    13581357      typedef T ReachedMap;
    13591358      static ReachedMap *createReachedMap(const Digraph &digraph) {
     
    13661365    /// \ref named-templ-param "Named parameter" for setting ReachedMap type.
    13671366    template <class T>
    1368     struct DefReachedMap : public BfsVisit< Digraph, Visitor,
    1369                                             DefReachedMapTraits<T> > {
    1370       typedef BfsVisit< Digraph, Visitor, DefReachedMapTraits<T> > Create;
     1367    struct SetReachedMap : public BfsVisit< Digraph, Visitor,
     1368                                            SetReachedMapTraits<T> > {
     1369      typedef BfsVisit< Digraph, Visitor, SetReachedMapTraits<T> > Create;
    13711370    };
    13721371    ///@}
  • lemon/bits/base_extender.h

    r220 r256  
    6060      Arc() {}
    6161
    62       /// Invalid arc constructor
     62      // Invalid arc constructor
    6363      Arc(Invalid i) : Edge(i), forward(true) {}
    6464
     
    7575    };
    7676
    77 
    78 
    79     using Parent::source;
    80 
    81     /// Source of the given Arc.
     77    /// First node of the edge
     78    Node u(const Edge &e) const {
     79      return Parent::source(e);
     80    }
     81
     82    /// Source of the given arc
    8283    Node source(const Arc &e) const {
    8384      return e.forward ? Parent::source(e) : Parent::target(e);
    8485    }
    8586
    86     using Parent::target;
    87 
    88     /// Target of the given Arc.
     87    /// Second node of the edge
     88    Node v(const Edge &e) const {
     89      return Parent::target(e);
     90    }
     91
     92    /// Target of the given arc
    8993    Node target(const Arc &e) const {
    9094      return e.forward ? Parent::target(e) : Parent::source(e);
     
    9397    /// \brief Directed arc from an edge.
    9498    ///
    95     /// Returns a directed arc corresponding to the specified Edge.
    96     /// If the given bool is true the given edge and the
    97     /// returned arc have the same source node.
    98     static Arc direct(const Edge &ue, bool d) {
    99       return Arc(ue, d);
    100     }
    101 
    102     /// Returns whether the given directed arc is same orientation as the
    103     /// corresponding edge.
     99    /// Returns a directed arc corresponding to the specified edge.
     100    /// If the given bool is true, the first node of the given edge and
     101    /// the source node of the returned arc are the same.
     102    static Arc direct(const Edge &e, bool d) {
     103      return Arc(e, d);
     104    }
     105
     106    /// Returns whether the given directed arc has the same orientation
     107    /// as the corresponding edge.
    104108    ///
    105109    /// \todo reference to the corresponding point of the undirected digraph
    106110    /// concept. "What does the direction of an edge mean?"
    107     static bool direction(const Arc &e) { return e.forward; }
    108 
     111    static bool direction(const Arc &a) { return a.forward; }
    109112
    110113    using Parent::first;
     
    229232      return Parent::maxArcId();
    230233    }
    231 
    232234
    233235    int arcNum() const {
  • lemon/dfs.h

    r252 r258  
    231231
    232232    template <class T>
    233     struct DefPredMapTraits : public Traits {
     233    struct SetPredMapTraits : public Traits {
    234234      typedef T PredMap;
    235235      static PredMap *createPredMap(const Digraph &)
     
    244244    ///\ref PredMap type.
    245245    template <class T>
    246     struct DefPredMap : public Dfs<Digraph, DefPredMapTraits<T> > {
    247       typedef Dfs<Digraph, DefPredMapTraits<T> > Create;
     246    struct SetPredMap : public Dfs<Digraph, SetPredMapTraits<T> > {
     247      typedef Dfs<Digraph, SetPredMapTraits<T> > Create;
    248248    };
    249249
    250250    template <class T>
    251     struct DefDistMapTraits : public Traits {
     251    struct SetDistMapTraits : public Traits {
    252252      typedef T DistMap;
    253253      static DistMap *createDistMap(const Digraph &)
     
    262262    ///\ref DistMap type.
    263263    template <class T>
    264     struct DefDistMap : public Dfs< Digraph, DefDistMapTraits<T> > {
    265       typedef Dfs<Digraph, DefDistMapTraits<T> > Create;
     264    struct SetDistMap : public Dfs< Digraph, SetDistMapTraits<T> > {
     265      typedef Dfs<Digraph, SetDistMapTraits<T> > Create;
    266266    };
    267267
    268268    template <class T>
    269     struct DefReachedMapTraits : public Traits {
     269    struct SetReachedMapTraits : public Traits {
    270270      typedef T ReachedMap;
    271271      static ReachedMap *createReachedMap(const Digraph &)
     
    280280    ///\ref ReachedMap type.
    281281    template <class T>
    282     struct DefReachedMap : public Dfs< Digraph, DefReachedMapTraits<T> > {
    283       typedef Dfs< Digraph, DefReachedMapTraits<T> > Create;
     282    struct SetReachedMap : public Dfs< Digraph, SetReachedMapTraits<T> > {
     283      typedef Dfs< Digraph, SetReachedMapTraits<T> > Create;
    284284    };
    285285
    286286    template <class T>
    287     struct DefProcessedMapTraits : public Traits {
     287    struct SetProcessedMapTraits : public Traits {
    288288      typedef T ProcessedMap;
    289289      static ProcessedMap *createProcessedMap(const Digraph &)
     
    298298    ///\ref ProcessedMap type.
    299299    template <class T>
    300     struct DefProcessedMap : public Dfs< Digraph, DefProcessedMapTraits<T> > {
    301       typedef Dfs< Digraph, DefProcessedMapTraits<T> > Create;
    302     };
    303 
    304     struct DefDigraphProcessedMapTraits : public Traits {
     300    struct SetProcessedMap : public Dfs< Digraph, SetProcessedMapTraits<T> > {
     301      typedef Dfs< Digraph, SetProcessedMapTraits<T> > Create;
     302    };
     303
     304    struct SetStandardProcessedMapTraits : public Traits {
    305305      typedef typename Digraph::template NodeMap<bool> ProcessedMap;
    306306      static ProcessedMap *createProcessedMap(const Digraph &g)
     
    315315    ///\ref ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>.
    316316    ///If you don't set it explicitly, it will be automatically allocated.
    317     template <class T>
    318     struct DefProcessedMapToBeDefaultMap :
    319       public Dfs< Digraph, DefDigraphProcessedMapTraits> {
    320       typedef Dfs< Digraph, DefDigraphProcessedMapTraits> Create;
     317    struct SetStandardProcessedMap :
     318      public Dfs< Digraph, SetStandardProcessedMapTraits > {
     319      typedef Dfs< Digraph, SetStandardProcessedMapTraits > Create;
    321320    };
    322321
     
    10011000
    10021001    template<class T>
    1003     struct DefPredMapBase : public Base {
     1002    struct SetPredMapBase : public Base {
    10041003      typedef T PredMap;
    10051004      static PredMap *createPredMap(const Digraph &) { return 0; };
    1006       DefPredMapBase(const TR &b) : TR(b) {}
     1005      SetPredMapBase(const TR &b) : TR(b) {}
    10071006    };
    10081007    ///\brief \ref named-templ-param "Named parameter"
     
    10121011    ///for setting \ref PredMap object.
    10131012    template<class T>
    1014     DfsWizard<DefPredMapBase<T> > predMap(const T &t)
     1013    DfsWizard<SetPredMapBase<T> > predMap(const T &t)
    10151014    {
    10161015      Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
    1017       return DfsWizard<DefPredMapBase<T> >(*this);
     1016      return DfsWizard<SetPredMapBase<T> >(*this);
    10181017    }
    10191018
    10201019    template<class T>
    1021     struct DefReachedMapBase : public Base {
     1020    struct SetReachedMapBase : public Base {
    10221021      typedef T ReachedMap;
    10231022      static ReachedMap *createReachedMap(const Digraph &) { return 0; };
    1024       DefReachedMapBase(const TR &b) : TR(b) {}
     1023      SetReachedMapBase(const TR &b) : TR(b) {}
    10251024    };
    10261025    ///\brief \ref named-templ-param "Named parameter"
     
    10301029    ///for setting \ref ReachedMap object.
    10311030    template<class T>
    1032     DfsWizard<DefReachedMapBase<T> > reachedMap(const T &t)
     1031    DfsWizard<SetReachedMapBase<T> > reachedMap(const T &t)
    10331032    {
    10341033      Base::_reached=reinterpret_cast<void*>(const_cast<T*>(&t));
    1035       return DfsWizard<DefReachedMapBase<T> >(*this);
     1034      return DfsWizard<SetReachedMapBase<T> >(*this);
    10361035    }
    10371036
    10381037    template<class T>
    1039     struct DefProcessedMapBase : public Base {
     1038    struct SetProcessedMapBase : public Base {
    10401039      typedef T ProcessedMap;
    10411040      static ProcessedMap *createProcessedMap(const Digraph &) { return 0; };
    1042       DefProcessedMapBase(const TR &b) : TR(b) {}
     1041      SetProcessedMapBase(const TR &b) : TR(b) {}
    10431042    };
    10441043    ///\brief \ref named-templ-param "Named parameter"
     
    10481047    ///for setting \ref ProcessedMap object.
    10491048    template<class T>
    1050     DfsWizard<DefProcessedMapBase<T> > processedMap(const T &t)
     1049    DfsWizard<SetProcessedMapBase<T> > processedMap(const T &t)
    10511050    {
    10521051      Base::_processed=reinterpret_cast<void*>(const_cast<T*>(&t));
    1053       return DfsWizard<DefProcessedMapBase<T> >(*this);
     1052      return DfsWizard<SetProcessedMapBase<T> >(*this);
    10541053    }
    10551054
    10561055    template<class T>
    1057     struct DefDistMapBase : public Base {
     1056    struct SetDistMapBase : public Base {
    10581057      typedef T DistMap;
    10591058      static DistMap *createDistMap(const Digraph &) { return 0; };
    1060       DefDistMapBase(const TR &b) : TR(b) {}
     1059      SetDistMapBase(const TR &b) : TR(b) {}
    10611060    };
    10621061    ///\brief \ref named-templ-param "Named parameter"
     
    10661065    ///for setting \ref DistMap object.
    10671066    template<class T>
    1068     DfsWizard<DefDistMapBase<T> > distMap(const T &t)
     1067    DfsWizard<SetDistMapBase<T> > distMap(const T &t)
    10691068    {
    10701069      Base::_dist=reinterpret_cast<void*>(const_cast<T*>(&t));
    1071       return DfsWizard<DefDistMapBase<T> >(*this);
     1070      return DfsWizard<SetDistMapBase<T> >(*this);
    10721071    }
    10731072
     
    13021301    ///@{
    13031302    template <class T>
    1304     struct DefReachedMapTraits : public Traits {
     1303    struct SetReachedMapTraits : public Traits {
    13051304      typedef T ReachedMap;
    13061305      static ReachedMap *createReachedMap(const Digraph &digraph) {
     
    13131312    /// \ref named-templ-param "Named parameter" for setting ReachedMap type.
    13141313    template <class T>
    1315     struct DefReachedMap : public DfsVisit< Digraph, Visitor,
    1316                                             DefReachedMapTraits<T> > {
    1317       typedef DfsVisit< Digraph, Visitor, DefReachedMapTraits<T> > Create;
     1314    struct SetReachedMap : public DfsVisit< Digraph, Visitor,
     1315                                            SetReachedMapTraits<T> > {
     1316      typedef DfsVisit< Digraph, Visitor, SetReachedMapTraits<T> > Create;
    13181317    };
    13191318    ///@}
  • lemon/dijkstra.h

    r251 r258  
    332332
    333333    template <class T>
    334     struct DefPredMapTraits : public Traits {
     334    struct SetPredMapTraits : public Traits {
    335335      typedef T PredMap;
    336336      static PredMap *createPredMap(const Digraph &)
     
    345345    ///\ref PredMap type.
    346346    template <class T>
    347     struct DefPredMap
    348       : public Dijkstra< Digraph, LengthMap, DefPredMapTraits<T> > {
    349       typedef Dijkstra< Digraph, LengthMap, DefPredMapTraits<T> > Create;
     347    struct SetPredMap
     348      : public Dijkstra< Digraph, LengthMap, SetPredMapTraits<T> > {
     349      typedef Dijkstra< Digraph, LengthMap, SetPredMapTraits<T> > Create;
    350350    };
    351351
    352352    template <class T>
    353     struct DefDistMapTraits : public Traits {
     353    struct SetDistMapTraits : public Traits {
    354354      typedef T DistMap;
    355355      static DistMap *createDistMap(const Digraph &)
     
    364364    ///\ref DistMap type.
    365365    template <class T>
    366     struct DefDistMap
    367       : public Dijkstra< Digraph, LengthMap, DefDistMapTraits<T> > {
    368       typedef Dijkstra< Digraph, LengthMap, DefDistMapTraits<T> > Create;
     366    struct SetDistMap
     367      : public Dijkstra< Digraph, LengthMap, SetDistMapTraits<T> > {
     368      typedef Dijkstra< Digraph, LengthMap, SetDistMapTraits<T> > Create;
    369369    };
    370370
    371371    template <class T>
    372     struct DefProcessedMapTraits : public Traits {
     372    struct SetProcessedMapTraits : public Traits {
    373373      typedef T ProcessedMap;
    374374      static ProcessedMap *createProcessedMap(const Digraph &)
     
    383383    ///\ref ProcessedMap type.
    384384    template <class T>
    385     struct DefProcessedMap
    386       : public Dijkstra< Digraph, LengthMap, DefProcessedMapTraits<T> > {
    387       typedef Dijkstra< Digraph, LengthMap, DefProcessedMapTraits<T> > Create;
    388     };
    389 
    390     struct DefDigraphProcessedMapTraits : public Traits {
     385    struct SetProcessedMap
     386      : public Dijkstra< Digraph, LengthMap, SetProcessedMapTraits<T> > {
     387      typedef Dijkstra< Digraph, LengthMap, SetProcessedMapTraits<T> > Create;
     388    };
     389
     390    struct SetStandardProcessedMapTraits : public Traits {
    391391      typedef typename Digraph::template NodeMap<bool> ProcessedMap;
    392392      static ProcessedMap *createProcessedMap(const Digraph &g)
     
    401401    ///\ref ProcessedMap type to be <tt>Digraph::NodeMap<bool></tt>.
    402402    ///If you don't set it explicitly, it will be automatically allocated.
    403     template <class T>
    404     struct DefProcessedMapToBeDefaultMap
    405       : public Dijkstra< Digraph, LengthMap, DefDigraphProcessedMapTraits> {
    406       typedef Dijkstra< Digraph, LengthMap, DefDigraphProcessedMapTraits>
     403    struct SetStandardProcessedMap
     404      : public Dijkstra< Digraph, LengthMap, SetStandardProcessedMapTraits > {
     405      typedef Dijkstra< Digraph, LengthMap, SetStandardProcessedMapTraits >
    407406      Create;
    408407    };
    409408
    410409    template <class H, class CR>
    411     struct DefHeapTraits : public Traits {
     410    struct SetHeapTraits : public Traits {
    412411      typedef CR HeapCrossRef;
    413412      typedef H Heap;
     
    426425    ///reference type.
    427426    template <class H, class CR = typename Digraph::template NodeMap<int> >
    428     struct DefHeap
    429       : public Dijkstra< Digraph, LengthMap, DefHeapTraits<H, CR> > {
    430       typedef Dijkstra< Digraph, LengthMap, DefHeapTraits<H, CR> > Create;
     427    struct SetHeap
     428      : public Dijkstra< Digraph, LengthMap, SetHeapTraits<H, CR> > {
     429      typedef Dijkstra< Digraph, LengthMap, SetHeapTraits<H, CR> > Create;
    431430    };
    432431
    433432    template <class H, class CR>
    434     struct DefStandardHeapTraits : public Traits {
     433    struct SetStandardHeapTraits : public Traits {
    435434      typedef CR HeapCrossRef;
    436435      typedef H Heap;
     
    451450    ///parameter and the heap's constructor waits for the cross reference.
    452451    template <class H, class CR = typename Digraph::template NodeMap<int> >
    453     struct DefStandardHeap
    454       : public Dijkstra< Digraph, LengthMap, DefStandardHeapTraits<H, CR> > {
    455       typedef Dijkstra< Digraph, LengthMap, DefStandardHeapTraits<H, CR> >
     452    struct SetStandardHeap
     453      : public Dijkstra< Digraph, LengthMap, SetStandardHeapTraits<H, CR> > {
     454      typedef Dijkstra< Digraph, LengthMap, SetStandardHeapTraits<H, CR> >
    456455      Create;
    457456    };
    458457
    459458    template <class T>
    460     struct DefOperationTraitsTraits : public Traits {
     459    struct SetOperationTraitsTraits : public Traits {
    461460      typedef T OperationTraits;
    462461    };
     
    468467    ///\ref OperationTraits type.
    469468    template <class T>
    470     struct DefOperationTraits
    471       : public Dijkstra<Digraph, LengthMap, DefOperationTraitsTraits<T> > {
    472       typedef Dijkstra<Digraph, LengthMap, DefOperationTraitsTraits<T> >
     469    struct SetOperationTraits
     470      : public Dijkstra<Digraph, LengthMap, SetOperationTraitsTraits<T> > {
     471      typedef Dijkstra<Digraph, LengthMap, SetOperationTraitsTraits<T> >
    473472      Create;
    474473    };
     
    12061205
    12071206    template<class T>
    1208     struct DefPredMapBase : public Base {
     1207    struct SetPredMapBase : public Base {
    12091208      typedef T PredMap;
    12101209      static PredMap *createPredMap(const Digraph &) { return 0; };
    1211       DefPredMapBase(const TR &b) : TR(b) {}
     1210      SetPredMapBase(const TR &b) : TR(b) {}
    12121211    };
    12131212    ///\brief \ref named-templ-param "Named parameter"
     
    12171216    ///for setting \ref PredMap object.
    12181217    template<class T>
    1219     DijkstraWizard<DefPredMapBase<T> > predMap(const T &t)
     1218    DijkstraWizard<SetPredMapBase<T> > predMap(const T &t)
    12201219    {
    12211220      Base::_pred=reinterpret_cast<void*>(const_cast<T*>(&t));
    1222       return DijkstraWizard<DefPredMapBase<T> >(*this);
     1221      return DijkstraWizard<SetPredMapBase<T> >(*this);
    12231222    }
    12241223
    12251224    template<class T>
    1226     struct DefProcessedMapBase : public Base {
     1225    struct SetProcessedMapBase : public Base {
    12271226      typedef T ProcessedMap;
    12281227      static ProcessedMap *createProcessedMap(const Digraph &) { return 0; };
    1229       DefProcessedMapBase(const TR &b) : TR(b) {}
     1228      SetProcessedMapBase(const TR &b) : TR(b) {}
    12301229    };
    12311230    ///\brief \ref named-templ-param "Named parameter"
     
    12351234    ///for setting \ref ProcessedMap object.
    12361235    template<class T>
    1237     DijkstraWizard<DefProcessedMapBase<T> > processedMap(const T &t)
     1236    DijkstraWizard<SetProcessedMapBase<T> > processedMap(const T &t)
    12381237    {
    12391238      Base::_processed=reinterpret_cast<void*>(const_cast<T*>(&t));
    1240       return DijkstraWizard<DefProcessedMapBase<T> >(*this);
     1239      return DijkstraWizard<SetProcessedMapBase<T> >(*this);
    12411240    }
    12421241
    12431242    template<class T>
    1244     struct DefDistMapBase : public Base {
     1243    struct SetDistMapBase : public Base {
    12451244      typedef T DistMap;
    12461245      static DistMap *createDistMap(const Digraph &) { return 0; };
    1247       DefDistMapBase(const TR &b) : TR(b) {}
     1246      SetDistMapBase(const TR &b) : TR(b) {}
    12481247    };
    12491248    ///\brief \ref named-templ-param "Named parameter"
     
    12531252    ///for setting \ref DistMap object.
    12541253    template<class T>
    1255     DijkstraWizard<DefDistMapBase<T> > distMap(const T &t)
     1254    DijkstraWizard<SetDistMapBase<T> > distMap(const T &t)
    12561255    {
    12571256      Base::_dist=reinterpret_cast<void*>(const_cast<T*>(&t));
    1258       return DijkstraWizard<DefDistMapBase<T> >(*this);
     1257      return DijkstraWizard<SetDistMapBase<T> >(*this);
    12591258    }
    12601259
  • test/heap_test.cc

    r212 r257  
    132132                      Node source) {
    133133
    134   typename Dijkstra<Digraph, IntArcMap>::template DefStandardHeap<Heap>::
     134  typename Dijkstra<Digraph, IntArcMap>::template SetStandardHeap<Heap>::
    135135    Create dijkstra(digraph, length);
    136136
Note: See TracChangeset for help on using the changeset viewer.