lemon/bfs.h
changeset 157 2ccc1afc2c52
parent 100 4f754b4cf82b
child 158 500f3cbff9e4
equal deleted inserted replaced
0:11bfb7ddeeaa 1:5858865b511e
    35 
    35 
    36   
    36   
    37   ///Default traits class of Bfs class.
    37   ///Default traits class of Bfs class.
    38 
    38 
    39   ///Default traits class of Bfs class.
    39   ///Default traits class of Bfs class.
    40   ///\param GR Digraph type.
    40   ///\tparam GR Digraph type.
    41   template<class GR>
    41   template<class GR>
    42   struct BfsDefaultTraits
    42   struct BfsDefaultTraits
    43   {
    43   {
    44     ///The digraph type the algorithm runs on. 
    44     ///The digraph type the algorithm runs on. 
    45     typedef GR Digraph;
    45     typedef GR Digraph;
   113   ///%BFS algorithm class.
   113   ///%BFS algorithm class.
   114   
   114   
   115   ///\ingroup search
   115   ///\ingroup search
   116   ///This class provides an efficient implementation of the %BFS algorithm.
   116   ///This class provides an efficient implementation of the %BFS algorithm.
   117   ///
   117   ///
   118   ///\param GR The digraph type the algorithm runs on. The default value is
   118   ///\tparam GR The digraph type the algorithm runs on. The default value is
   119   ///\ref ListDigraph. The value of GR is not used directly by Bfs, it
   119   ///\ref ListDigraph. The value of GR is not used directly by Bfs, it
   120   ///is only passed to \ref BfsDefaultTraits.
   120   ///is only passed to \ref BfsDefaultTraits.
   121   ///\param TR Traits class to set various data types used by the algorithm.
   121   ///\tparam TR Traits class to set various data types used by the algorithm.
   122   ///The default traits class is
   122   ///The default traits class is
   123   ///\ref BfsDefaultTraits "BfsDefaultTraits<GR>".
   123   ///\ref BfsDefaultTraits "BfsDefaultTraits<GR>".
   124   ///See \ref BfsDefaultTraits for the documentation of
   124   ///See \ref BfsDefaultTraits for the documentation of
   125   ///a Bfs traits class.
   125   ///a Bfs traits class.
   126   ///
       
   127   ///\author Alpar Juttner
       
   128 
   126 
   129 #ifdef DOXYGEN
   127 #ifdef DOXYGEN
   130   template <typename GR,
   128   template <typename GR,
   131 	    typename TR>
   129 	    typename TR>
   132 #else
   130 #else
   754   };
   752   };
   755 
   753 
   756   ///Default traits class of Bfs function.
   754   ///Default traits class of Bfs function.
   757 
   755 
   758   ///Default traits class of Bfs function.
   756   ///Default traits class of Bfs function.
   759   ///\param GR Digraph type.
   757   ///\tparam GR Digraph type.
   760   template<class GR>
   758   template<class GR>
   761   struct BfsWizardDefaultTraits
   759   struct BfsWizardDefaultTraits
   762   {
   760   {
   763     ///The digraph type the algorithm runs on. 
   761     ///The digraph type the algorithm runs on. 
   764     typedef GR Digraph;
   762     typedef GR Digraph;
  1163 #endif
  1161 #endif
  1164 
  1162 
  1165   /// \brief Default traits class of BfsVisit class.
  1163   /// \brief Default traits class of BfsVisit class.
  1166   ///
  1164   ///
  1167   /// Default traits class of BfsVisit class.
  1165   /// Default traits class of BfsVisit class.
  1168   /// \param _Digraph Digraph type.
  1166   /// \tparam _Digraph Digraph type.
  1169   template<class _Digraph>
  1167   template<class _Digraph>
  1170   struct BfsVisitDefaultTraits {
  1168   struct BfsVisitDefaultTraits {
  1171 
  1169 
  1172     /// \brief The digraph type the algorithm runs on. 
  1170     /// \brief The digraph type the algorithm runs on. 
  1173     typedef _Digraph Digraph;
  1171     typedef _Digraph Digraph;
  1199   ///
  1197   ///
  1200   /// The %BfsVisit class provides an alternative interface to the Bfs
  1198   /// The %BfsVisit class provides an alternative interface to the Bfs
  1201   /// class. It works with callback mechanism, the BfsVisit object calls
  1199   /// class. It works with callback mechanism, the BfsVisit object calls
  1202   /// on every bfs event the \c Visitor class member functions. 
  1200   /// on every bfs event the \c Visitor class member functions. 
  1203   ///
  1201   ///
  1204   /// \param _Digraph The digraph type the algorithm runs on. The default value is
  1202   /// \tparam _Digraph The digraph type the algorithm runs on. The default value is
  1205   /// \ref ListDigraph. The value of _Digraph is not used directly by Bfs, it
  1203   /// \ref ListDigraph. The value of _Digraph is not used directly by Bfs, it
  1206   /// is only passed to \ref BfsDefaultTraits.
  1204   /// is only passed to \ref BfsDefaultTraits.
  1207   /// \param _Visitor The Visitor object for the algorithm. The 
  1205   /// \tparam _Visitor The Visitor object for the algorithm. The 
  1208   /// \ref BfsVisitor "BfsVisitor<_Digraph>" is an empty Visitor which
  1206   /// \ref BfsVisitor "BfsVisitor<_Digraph>" is an empty Visitor which
  1209   /// does not observe the Bfs events. If you want to observe the bfs
  1207   /// does not observe the Bfs events. If you want to observe the bfs
  1210   /// events you should implement your own Visitor class.
  1208   /// events you should implement your own Visitor class.
  1211   /// \param _Traits Traits class to set various data types used by the 
  1209   /// \tparam _Traits Traits class to set various data types used by the 
  1212   /// algorithm. The default traits class is
  1210   /// algorithm. The default traits class is
  1213   /// \ref BfsVisitDefaultTraits "BfsVisitDefaultTraits<_Digraph>".
  1211   /// \ref BfsVisitDefaultTraits "BfsVisitDefaultTraits<_Digraph>".
  1214   /// See \ref BfsVisitDefaultTraits for the documentation of
  1212   /// See \ref BfsVisitDefaultTraits for the documentation of
  1215   /// a Bfs visit traits class.
  1213   /// a Bfs visit traits class.
  1216   ///
       
  1217   /// \author Jacint Szabo, Alpar Juttner and Balazs Dezso
       
  1218 #ifdef DOXYGEN
  1214 #ifdef DOXYGEN
  1219   template <typename _Digraph, typename _Visitor, typename _Traits>
  1215   template <typename _Digraph, typename _Visitor, typename _Traits>
  1220 #else
  1216 #else
  1221   template <typename _Digraph = ListDigraph,
  1217   template <typename _Digraph = ListDigraph,
  1222 	    typename _Visitor = BfsVisitor<_Digraph>,
  1218 	    typename _Visitor = BfsVisitor<_Digraph>,