Vaucanson  1.4.1
free_monoid_int.hxx
1 // free_monoid_int.hxx: this file is part of the Vaucanson project.
2 //
3 // Vaucanson, a generic library for finite state machines.
4 //
5 // Copyright (C) 2008 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_ALGEBRA_IMPLEMENTATION_MONOID_FREE_MONOID_INT_HXX
18 # define VCSN_ALGEBRA_IMPLEMENTATION_MONOID_FREE_MONOID_INT_HXX
19 
20 # include <vaucanson/algebra/implementation/monoid/free_monoid_int.hh>
21 
22 namespace vcsn
23 {
24  namespace algebra
25  {
26 
27 # define EXACT_TYPE FreeMonoid<Element<AlphabetSet<int>, std::set<int> > >
28 
29  inline
30  MonoidRep<EXACT_TYPE>::MonoidRep()
31  {
32  // Discard any initialization by the parent class.
33  maybe_epsilon.clear();
34 
35  // Sane defaults.
36  maybe_epsilon.push_back("e");
37  maybe_epsilon.push_back("1");
38 
39  // Trying with more than one char.
40  maybe_epsilon.push_back("_e");
41  maybe_epsilon.push_back("eps");
42 
43  empty = *(maybe_epsilon.begin());
44  concat = "#";
45  }
46 
47  template <typename Semiring>
48  SeriesRep<Semiring, EXACT_TYPE>::SeriesRep()
49  {
50  // Discard any initialization by the parent class.
51  this->maybe_zero.clear();
52  this->spaces.clear();
53 
54  // Sane defaults.
55  this->maybe_zero.push_back("z");
56  this->maybe_zero.push_back("0");
57 
58  // Trying with more than one char.
59  this->maybe_zero.push_back("_z");
60  this->maybe_zero.push_back("zero");
61 
62  this->zero = *(this->maybe_zero.begin());
63  this->open_par = "(";
64  this->close_par = ")";
65  this->plus = "+";
66  this->times = ".";
67  this->star = "*";
68  this->open_weight = "{";
69  this->close_weight = "}";
70  this->spaces.push_back(" ");
71  }
72 
73 # undef EXACT_TYPE
74 
75  } // ! algebra
76 
77 } // ! vcsn
78 
79 #endif // ! VCSN_ALGEBRA_IMPLEMENTATION_MONOID_FREE_MONOID_INT_HXX