alphabet_set.hh

00001 // alphabet_set.hh: this file is part of the Vaucanson project.
00002 //
00003 // Vaucanson, a generic library for finite state machines.
00004 //
00005 // Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008 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_ALGEBRA_IMPLEMENTATION_ALPHABETS_ALPHABET_SET_HH
00018 # define VCSN_ALGEBRA_IMPLEMENTATION_ALPHABETS_ALPHABET_SET_HH
00019 
00020 # include <vaucanson/algebra/implementation/alphabets/alphabets.hh>
00021 # include <vaucanson/misc/usual_macros.hh>
00022 
00023 namespace vcsn {
00024 
00025   namespace algebra {
00026 
00030     /*--------------------------------------------.
00031     | alphabet_traits<AlphabetSet<L>,std::set<L>> |
00032     `--------------------------------------------*/
00033 
00035     template <typename L>
00036     struct alphabet_traits<AlphabetSet<L>, std::set<L> >
00037     {
00039       typedef Element<AlphabetSet<L>, std::set<L> > alphabet_t;
00040 
00042       typedef L letter_t;
00043 
00045       typedef typename letter_traits<letter_t>::first_projection_t
00046       first_projection_letter_t;
00047 
00049       typedef typename letter_traits<letter_t>::second_projection_t
00050       second_projection_letter_t;
00051 
00053       typedef Element<AlphabetSet<first_projection_letter_t>,
00054               std::set<first_projection_letter_t> > first_projection_t;
00055 
00057       typedef Element<AlphabetSet<second_projection_letter_t>,
00058               std::set<second_projection_letter_t> > second_projection_t;
00059 
00061       static first_projection_t first_projection(const alphabet_t&);
00062 
00064       static second_projection_t second_projection(const alphabet_t&);
00065     };
00066 
00070   } // algebra
00071 
00075   /*-----------------------------------------.
00076   | MetaElement<AlphabetSet<L>, std::set<L>> |
00077   `-----------------------------------------*/
00078 
00084   template<typename L>
00085   struct MetaElement<algebra::AlphabetSet<L>, std::set<L> >
00086     : MetaElement<algebra::AlphabetSetBase<algebra::AlphabetSet<L> >, std::set<L> >
00087   {
00089       static const bool dynamic_value = true;
00090   };
00091 
00095   namespace algebra {
00096 
00097     template <typename L>
00098     size_t op_max_size(const algebra::AlphabetSet<L>&, const std::set<L>&);
00099 
00100     template <typename L>
00101     bool op_contains(const algebra::AlphabetSet<L>& s, const std::set<L>& a);
00102 
00103     template <typename L>
00104     bool op_is_finite(const algebra::AlphabetSet<L>& s, const std::set<L>& a);
00105 
00106     template <typename L>
00107     bool op_contains_e(const algebra::AlphabetSet<L>& s, const std::set<L>& a,
00108                        const L& v);
00109   }
00110 
00111 } // vcsn
00112 
00113 # if !defined VCSN_USE_INTERFACE_ONLY || defined VCSN_USE_LIB
00114 #  include <vaucanson/algebra/implementation/alphabets/alphabet_set.hxx>
00115 # endif // VCSN_USE_INTERFACE_ONLY
00116 
00117 #endif // ! VCSN_ALGEBRA_IMPLEMENTATION_ALPHABETS_ALPHABET_SET_HH

Generated on Thu Oct 9 20:22:33 2008 for Vaucanson by  doxygen 1.5.1