Vaucanson 1.4
free_monoid_int.hxx
00001 // free_monoid_int.hxx: this file is part of the Vaucanson project.
00002 //
00003 // Vaucanson, a generic library for finite state machines.
00004 //
00005 // Copyright (C) 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_MONOID_FREE_MONOID_INT_HXX
00018 # define VCSN_ALGEBRA_IMPLEMENTATION_MONOID_FREE_MONOID_INT_HXX
00019 
00020 # include <vaucanson/algebra/implementation/monoid/free_monoid_int.hh>
00021 
00022 namespace vcsn
00023 {
00024   namespace algebra
00025   {
00026 
00027 # define EXACT_TYPE FreeMonoid<Element<AlphabetSet<int>, std::set<int> > >
00028 
00029     inline
00030     MonoidRep<EXACT_TYPE>::MonoidRep()
00031     {
00032       // Discard any initialization by the parent class.
00033       maybe_epsilon.clear();
00034 
00035       // Sane defaults.
00036       maybe_epsilon.push_back("e");
00037       maybe_epsilon.push_back("1");
00038 
00039       // Trying with more than one char.
00040       maybe_epsilon.push_back("_e");
00041       maybe_epsilon.push_back("eps");
00042 
00043       empty = *(maybe_epsilon.begin());
00044       concat = "#";
00045     }
00046 
00047     template <typename Semiring>
00048     SeriesRep<Semiring, EXACT_TYPE>::SeriesRep()
00049     {
00050       // Discard any initialization by the parent class.
00051       this->maybe_zero.clear();
00052       this->spaces.clear();
00053 
00054       // Sane defaults.
00055       this->maybe_zero.push_back("z");
00056       this->maybe_zero.push_back("0");
00057 
00058       // Trying with more than one char.
00059       this->maybe_zero.push_back("_z");
00060       this->maybe_zero.push_back("zero");
00061 
00062       this->zero = *(this->maybe_zero.begin());
00063       this->open_par = "(";
00064       this->close_par = ")";
00065       this->plus = "+";
00066       this->times = ".";
00067       this->star = "*";
00068       this->open_weight = "{";
00069       this->close_weight = "}";
00070       this->spaces.push_back(" ");
00071     }
00072 
00073 # undef EXACT_TYPE
00074 
00075   } // ! algebra
00076 
00077 } // ! vcsn
00078 
00079 #endif // ! VCSN_ALGEBRA_IMPLEMENTATION_MONOID_FREE_MONOID_INT_HXX