Vaucanson  1.4.1
is_trim.hxx
1 // is_trim.hxx: this file is part of the Vaucanson project.
2 //
3 // Vaucanson, a generic library for finite state machines.
4 //
5 // Copyright (C) 2011 The Vaucanson Group.
6 //
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License
9 // as published by the Free Software Foundation; either version 2
10 // of the License, or (at your option) any later version.
11 //
12 // The complete GNU General Public Licence Notice can be found as the
13 // `COPYING' file in the root directory.
14 //
15 // The Vaucanson Group consists of people listed in the `AUTHORS' file.
16 //
17 #ifndef VCSN_ALGORITHMS_IS_TRIM_HXX
18 # define VCSN_ALGORITHMS_IS_TRIM_HXX
19 
21 
22 # include <vaucanson/automata/concept/automata_base.hh>
23 
26 
27 #include <algorithm>
28 
29 namespace vcsn
30 {
31  template<typename A, typename AI>
32  bool
34  {
35  int size = a.states ().size ();
36 
37  if (size == accessible_states (a).size ())
38  return coaccessible_states (a).size () == size;
39  return false;
40  }
41 } // !vcsn
42 
43 #endif // !VCSN_ALGORITHMS_IS_TRIM_HXX