00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef VCSN_ALGORITHMS_DFS_HH
00018 # define VCSN_ALGORITHMS_DFS_HH
00019
00020 # include <map>
00021
00033 namespace vcsn
00034 {
00035
00036 template <typename S, typename T>
00037 void DepthFirstSearchBase<S, T>::operator() (const auto_t& aut)
00038 {
00039 visited_.clear();
00040 do_dfs(aut.structure(), aut);
00041 }
00042
00043
00044 template <typename S, typename T>
00045 void DepthFirstSearchBase<S, T>::do_dfs() (SELECTOR(AutomatBase<S>), const auto_t& aut)
00046 {
00047 for_all_states(s, aut)
00048 visited_[s] = WHITE;
00049
00050 for_all_states(s, aut)
00051 if (visited_[s] == WHITE)
00052 do_dfs(s);
00053 }
00054
00055
00056 template <typename S, typename T>
00057 void DepthFirstSearchBase<S, T>::do_dfs() (const hstate_t& s, const auto_t& aut)
00058 {
00059 visited_[s] = GRAY;
00060 switch
00061 }
00062
00063
00064 }
00065
00066
00067 #endif // ! VCSN_ALGORITHMS_DFS_HXX