COIN-OR::LEMON - Graph Library

Changeset 258:0310c8984732 in lemon-1.2 for lemon/dfs.h


Ignore:
Timestamp:
09/09/08 21:52:45 (11 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Parents:
257:8d76a7bf9961 (diff), 256:c760d691fe3c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

Merge

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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/dfs.h

    r257 r258  
    12091209  /// the member functions of the \c Visitor class on every DFS event.
    12101210  ///
     1211  /// This interface of the DFS algorithm should be used in special cases
     1212  /// when extra actions have to be performed in connection with certain
     1213  /// events of the DFS algorithm. Otherwise consider to use Dfs or dfs()
     1214  /// instead.
     1215  ///
    12111216  /// \tparam _Digraph The type of the digraph the algorithm runs on.
    12121217  /// The default value is
Note: See TracChangeset for help on using the changeset viewer.