Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

dfs.hh

Go to the documentation of this file.
00001 // dfs.hh: this file is part of the Vaucanson project.
00002 //
00003 // Vaucanson, a generic library for finite state machines.
00004 //
00005 // Copyright (C) 2006, 2007 The Vaucanson Group.
00006 //
00007 // This program is free software; you can redistribute it and/or
00008 // modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2
00010 // of the License, or (at your option) any later version.
00011 //
00012 // The complete GNU General Public Licence Notice can be found as the
00013 // `COPYING' file in the root directory.
00014 //
00015 // The Vaucanson Group consists of people listed in the `AUTHORS' file.
00016 //
00017 #ifndef VCSN_ALGORITHMS_DFS_HH
00018 # define VCSN_ALGORITHMS_DFS_HH
00019 
00020 # include <map>
00021   
00038 namespace vcsn
00039 {
00040 
00041   template <typename S, typename T>
00042   class DepthFirstSearchBase
00043   {
00044     public:
00045       typedef Element<S, T> auto_t;
00046       AUTOMATON_TYPES(auto_t);
00047       typedef enum { WHITE, GRAY, BLACK } color_t;
00048       typedef std::map<hstate_t, color_t> visited_t;
00049       typedef std::vector<hstate_t> delta_ret_t;
00050 
00051       void operator() (const auto_t& aut);
00052 
00053     protected:
00054 
00055       void do_dfs(SELECTOR(AutomataBase<S>, const auto_t& aut));
00056 
00057       void do_dfs(const hstate_t& s);
00058 
00059     private:
00060       visited_t visited_;
00061 
00062   };
00063 }
00066 # ifndef VCSN_USE_INTERFACE_ONLY
00067 #  include "dfs.hxx"
00068 # endif // VCSN_USE_INTERFACE_ONLY
00069 
00070 #endif // ! VCSN_ALGORITHMS_DFS_HH

Generated on Fri Oct 12 21:22:46 2007 for Vaucanson by  doxygen 1.4.4