CoCoALib-0.9905 date: 23 May 2007


TmpGRStats.H

Go to the documentation of this file.
00001 #ifndef CoCoA_GRStats_H
00002 #define CoCoA_GRStats_H
00003 
00004 //   Copyright (c)  2005  Massimo Caboara
00005 
00006 //   This file is part of the source of CoCoALib, the CoCoA Library.
00007 
00008 //   CoCoALib is free software; you can redistribute it and/or modify
00009 //   it under the terms of the GNU General Public License (version 2)
00010 //   as published by the Free Software Foundation.  A copy of the full
00011 //   licence may be found in the file COPYING in this directory.
00012 
00013 //   CoCoALib is distributed in the hope that it will be useful,
00014 //   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 //   GNU General Public License for more details.
00017 
00018 //   You should have received a copy of the GNU General Public License
00019 //   along with CoCoA; if not, write to the Free Software
00020 //   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021 
00022 
00023 #include "CoCoA/degree.H"
00024 
00025 #include <iosfwd>
00026 // using std::ostream;
00027 #include <list>
00028 // using std::list;
00029 
00030 namespace CoCoA
00031 {
00032 
00033   class DegStats
00034   {
00035   public:
00036 
00037     DegStats(const degree& Deg);
00038 
00039     DegStats(const degree& Deg,
00040              unsigned int PInserted,
00041              unsigned int GMLilled,
00042              unsigned int CopKilled,
00043              unsigned int BKilled,
00044              unsigned int Useful,
00045              unsigned int Useless,
00046              unsigned int Pairsno);
00047 
00048     ~DegStats(){};
00049     degree myDeg;
00050     unsigned int myPInserted;
00051     unsigned int myGMKilled;
00052     unsigned int myCopKilled;
00053     unsigned int myBKilled;
00054     unsigned int myUseful;
00055     unsigned int myUseless;
00056     unsigned int myPairsNo;
00057   };
00058 
00059 
00060 //------------------------Stats--------------------------------
00061 
00062   class Stats
00063   {
00064   public:
00065     Stats(unsigned int NumGens, int level);
00066     Stats(unsigned int NumGens,
00067           int level,
00068           unsigned int PInserted,
00069           unsigned int GMKilled,
00070           unsigned int CopKilled,
00071           unsigned int Useful,
00072           unsigned int Useless,
00073           unsigned int BKilled,
00074           unsigned int BTouched,
00075           unsigned int GMTouched,
00076           unsigned int PolyDeleted,
00077           unsigned int PolyDHed,
00078           unsigned int DegDH,
00079           bool PrintReduction,
00080           bool PrintDeg,
00081           bool PrintGM,
00082           bool PrintCop,
00083           bool PrintBC,
00084           bool PrintNumPair,
00085           bool PrintFinal,
00086           bool PrintFinalFull,
00087           bool PrintNewPairs,
00088           bool PrintPolyDeleted,
00089           bool PrintPolyDH,
00090           bool PrintPolyLen,
00091           bool PrintKill);
00092     ~Stats(){};
00093   
00094     void mySetLevel(int level);
00095     void myUpgradeDegStats(const degree& new_deg, unsigned int pairs_no);
00096     void myStampa(std::ostream&)const;
00097     int  myGetLevel()const{return myLevel;}
00098 
00099     // These are the statistics data. They are computed in any case
00100     unsigned int myPInserted;///< Number of Pairs Inserted
00101     unsigned int myGMKilled;///< Number of Pairs killed by the GM criteria
00102     unsigned int myCopKilled;///< Number of Pairs killed by the coprime criteria
00103     unsigned int myUseful;///< Number of Pairs that doesn't reduce to 0
00104     unsigned int myUseless;///< Number of Pairs that reduce to 0
00105     unsigned int myBKilled;///< Number of Pairs killed by the Back criterion
00106     unsigned int myBTouched;///< Number of pairs examined by the Back criterion
00107     unsigned int myGMTouched;///< Number of Pairs examined by the GM criteria
00108     unsigned int myPolyDeleted;///< Nuymber of polys deleted by new polys - 0 if the example is homog
00109     unsigned int myPolyDHed;///< Nuymber of polys dehomog'ed by dehomogalgorithm - pseudo homog only
00110     unsigned int myDegDH;///< Total of degrees dropped by the dehomog algorithm
00111     unsigned int myNumGens;///< Nuymber of the initial generators of the GBasis
00112 
00113     std::list<DegStats> myDegByDeg;///< A list of deg-by deg stats computed during execution
00114     std::list<std::pair<unsigned int,unsigned int> > myPolyLens;///< List of <len Spoly,len reduced spoly>
00115 
00116     // These are the fine statistics settings. They control what is printed.
00117     // Default is false for everything. You can manipulate it by the
00118     // set_stat_level procedure. Fine tuning can be done by changing the values
00119     // one by one in the GReductor ctor
00120     bool myPrintReduction;///< Print reductiob stats during Buchberger
00121     bool myPrintDeg;///< Print new deg when deg change during Buchberger
00122     bool myPrintCop;///< Print coprime killed during Buchberger
00123     bool myPrintGM;///< Print GM criteria stats during Buchberger
00124     bool myPrintBC;///< Print Back criterion stats during Buchberger
00125     bool myPrintKill;///< Print KIll criterion stats during Buchberger
00126     bool myPrintNumPair;///< Print number of pairs after every reduction
00127     bool myPrintNewPairs;///< Print data about new pairs creation during Buchberger
00128     bool myPrintPolyDeleted;///< Prints the number of polys deleted by new polys -
00129     bool myPrintPolyDH;///< Prints the number of polys dhmog'ed - new dehomog alg
00130     bool myPrintFinal;///< Print stat data after Buchberger
00131     bool myPrintFinalFull;///< Print full stat data degree by degree after Buchberger
00132     bool myPrintPolyLen;///< Print poly len stats after Buchberger
00133 
00134 
00135   private:
00136 
00137     int myLevel;
00138 
00139   };
00140 
00141 
00142 }// end namespace cocoa
00143 
00144 // RCS header/log on the next few lines
00145 // $Header: /Volumes/Home/cocoa/cvs-repository/CoCoALib-0.99/include/CoCoA/TmpGRStats.H,v 1.1 2007/03/09 18:56:56 bigatti Exp $
00146 // $Log: TmpGRStats.H,v $
00147 // Revision 1.1  2007/03/09 18:56:56  bigatti
00148 // -- added Tmp prefix to Groebner related files
00149 //
00150 // Revision 1.1.1.1  2007/03/09 15:16:11  abbott
00151 // Imported files
00152 //
00153 // Revision 1.5  2007/03/08 18:42:06  cocoa
00154 // Cleaned up whitespace.
00155 //
00156 // Revision 1.4  2006/12/06 17:11:16  cocoa
00157 // -- removed #include "config.H"
00158 //
00159 // Revision 1.3  2006/11/24 17:18:49  cocoa
00160 // -- doxygen style comments
00161 //
00162 // Revision 1.2  2006/10/06 14:04:16  cocoa
00163 // Corrected position of #ifndef in header files.
00164 // Separated CoCoA_ASSERT into assert.H from config.H;
00165 // many minor consequential changes (have to #include assert.H).
00166 // A little tidying of #include directives (esp. in Max's code).
00167 //
00168 // Revision 1.1.1.1  2006/05/30 11:39:36  cocoa
00169 // Imported files
00170 //
00171 // Revision 1.2  2006/01/17 15:44:56  cocoa
00172 // -- chamges by Max for operations with modules
00173 //
00174 // Revision 1.1.1.1  2005/10/17 10:46:54  cocoa
00175 // Imported files
00176 //
00177 // Revision 1.1.1.1  2005/05/03 15:47:30  cocoa
00178 // Imported files
00179 //
00180 // Revision 1.2  2005/04/19 14:06:04  cocoa
00181 // Added GPL and GFDL licence stuff.
00182 //
00183 // Revision 1.1.1.1  2005/01/27 15:12:13  cocoa
00184 // Imported files
00185 //
00186 // Revision 1.3  2004/11/11 13:37:49  cocoa
00187 // -- CVS log at the end
00188 //
00189 // Revision 1.2  2004/06/16 16:13:41  cocoa
00190 // Improved I/O facilities with knock-on changes
00191 //
00192 // Revision 1.1.1.1  2003/09/24 12:55:43  cocoa
00193 // Imported files
00194 //
00195 // Revision 1.8  2003/06/23 17:09:34  abbott
00196 // Minor cleaning prior to public release.
00197 // Improved the include directives,
00198 //
00199 // Revision 1.7  2003/05/29 16:44:58  bigatti
00200 // - added: myLevel
00201 //
00202 // Revision 1.6  2003/05/14 17:04:21  bigatti
00203 // *** empty log message ***
00204 //
00205 
00206 #endif

Generated on Wed May 23 13:45:25 2007 for CoCoALib by  doxygen 1.4.6