skeleton.hh

Go to the documentation of this file.
00001 // skeleton.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 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_ALGORITHMS_INTERNAL_SKELETON_HH
00018 # define VCSN_ALGORITHMS_INTERNAL_SKELETON_HH
00019 
00030 # include <vaucanson/automata/concept/automata_base.hh>
00031 # include <vaucanson/tools/usual_macros.hh>
00032 # include <vector>
00033 
00034 
00035 namespace vcsn
00036 {
00037   // "Skeleton" of an automaton, consisting of a numbering of states
00038   // and transitions by means of vectors. Additional auxiliary vectors are
00039   // not used in this file.
00040   template<typename A, typename T>
00041   class Skeleton
00042   {
00043     public:
00044 
00045       Skeleton(const Element<A, T>& x);
00046 
00047       const Element<A, T>& a;
00048 
00049       // Vector of states. Each states can be also represented by its
00050       // index.
00051       std::vector<hstate_t> states;
00052       // Vector of transitions. Each transition can be also
00053       // represented by its index.
00054       std::vector<htransition_t> transitions;
00055       std::vector<int> origins_transitions;
00056       std::vector<int> aims_transitions;
00057 
00058       // List of indices of ingoing transitions in lex. order of each state
00059       std::vector< std::list<int> > delta_in;
00060       // List of indices of outgoing transitions in lex. order of each state
00061       std::vector< std::list<int> > delta_out;
00062 
00063 
00064       // Indices of initial and final states
00065       std::list<int> I, F;
00066       // Index in labels of the label of each transition
00067       std::vector<int> transitions_labels;
00068       // (transitions_labels[i] = index of label of transition i) Auxiliary data
00069       std::vector<int> aux_states_int;
00070       std::vector<bool> aux_states_bool;
00071       std::vector<void*> aux_states_generic;
00072       std::vector<int> aux_transitions_int;
00073       std::vector<bool> aux_transitions_bool;
00074       std::vector<void*> aux_transitions_generic;
00075 
00076       void reserve_aux_states_int();
00077       void reserve_aux_states_bool();
00078       void reserve_aux_states_generic();
00079       void reserve_aux_transitions_int();
00080       void reserve_aux_transitions_bool();
00081       void reserve_aux_transitions_generic();
00082   };
00083 
00084 } // vcsn
00085 
00086 # ifndef VCSN_USE_INTERFACE_ONLY
00087 #  include <vaucanson/algorithms/internal/skeleton.hxx>
00088 # endif // VCSN_USE_INTERFACE_ONLY
00089 
00090 #endif // ! VCSN_ALGORITHMS_INTERNAL_SKELETON_HH

Generated on Fri Jul 28 12:18:52 2006 for Vaucanson by  doxygen 1.4.6