include/CatalanSuit.hpp

Go to the documentation of this file.
00001 // CatalanSuit.hpp: this file is part of the REGAL project.
00002 //
00003 // REGAL : Random and Exhaustive Generators for Automata - Library
00004 //
00005 // Copyright (C) 2007 Julien DAVID.
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 //
00016 #ifndef CATALANSUIT
00017 #define CATALANSUIT
00018 
00019 #include "toolbox/GenericFunction.hpp"
00020 #include "AbstractSuit.hpp"
00021 
00022 
00023 namespace regal{
00024   class CatalanSuit: public AbstractSuit{
00025   private:
00026     int automatonSize; 
00027     int alphabetSize; 
00029   public:
00030     int * first();
00031     int * next();
00032     
00040     int getMax(const int & pos){return (pos<size)?Min(tab[pos],automatonSize):automatonSize;}
00041     
00047     CatalanSuit(const int & autSize,const int alphaSize):AbstractSuit::AbstractSuit((alphaSize-1)*autSize+1){
00048       automatonSize=autSize;
00049       alphabetSize=alphaSize;
00050       verbose("Creation of a CatalanSuit");
00051     }
00052     
00056     virtual ~CatalanSuit(){
00057       verbose("Destruction of a CatalanSuit");
00058     }
00059   };
00060   
00061 }
00062 
00063 #endif

Generated on Mon Sep 29 16:33:58 2008 for REGAL by  doxygen 1.5.1