Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

mootTypes.h

Go to the documentation of this file.
00001 /*-*- Mode: C++ -*-*/
00002 
00003 /*
00004    libmoot : moocow's part-of-speech tagging library
00005    Copyright (C) 2003-2005 by Bryan Jurish <moocow@ling.uni-potsdam.de>
00006 
00007    This library is free software; you can redistribute it and/or
00008    modify it under the terms of the GNU Lesser General Public
00009    License as published by the Free Software Foundation; either
00010    version 2.1 of the License, or (at your option) any later version.
00011    
00012    This library is distributed in the hope that it will be useful,
00013    but WITHOUT ANY WARRANTY; without even the implied warranty of
00014    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015    Lesser General Public License for more details.
00016    
00017    You should have received a copy of the GNU Lesser General Public
00018    License along with this library; if not, write to the Free Software
00019    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
00020 */
00021 
00022 /*----------------------------------------------------------------------
00023  * Name: mootTypes.h
00024  * Author: Bryan Jurish <moocow@ling.uni-potsdam.de>
00025  * Description:
00026  *   + shared typedefs for libmoot
00027  *----------------------------------------------------------------------*/
00032 #ifndef _moot_TYPES_H
00033 #define _moot_TYPES_H
00034 
00035 #include <string>
00036 #include <map>
00037 #include <set>
00038 #include <deque>
00039 #include <mootSTLHacks.h>
00040 
00041 /* Maximum weight */
00042 #if !defined(MAXFLOAT)
00043 # if defined(HAVE_VALUES_H)
00044 #  include <values.h>
00045 # elif defined(HAVE_FLOAT_H)
00046 #  include <float.h>
00047 # endif /* HAVE_VALUES_H */
00048 # if !defined(MAXFLOAT)
00049 #  define MAXFLOAT 1E38
00050 # endif /* !defined(MAXFLOAT) [2nd] */
00051 #endif /* !defined(MAXFLOAT) */
00052 
00053 moot_BEGIN_NAMESPACE
00054 
00055 using namespace std;
00056 
00057 #ifdef moot_STL_NAMESPACE
00058  using namespace moot_STL_NAMESPACE;
00059 #endif
00060 
00061 /*----------------------------------------------------------------------
00062  * Basic Types
00063  *----------------------------------------------------------------------*/
00064 
00065 //#define MOOT_USE_DOUBLE
00066 
00067 #ifdef MOOT_USE_DOUBLE
00068 
00069 typedef double ProbT;
00070 #else
00071 
00072 typedef float ProbT;
00073 #endif //-- MOOT_USE_DOUBLE
00074 
00076 typedef ProbT CountT;
00077 
00078 
00085 #define mootProbEpsilon  1.19209290E-06F
00086 /*
00087 #ifdef FLT_EPSILON
00088 //#define mootProbEpsilon FLT_EPSILON*10
00089 # define mootProbEpsilon  FLT_EPSILON*10
00090 #else
00091 # define mootProbEpsilon  1.19209290E-06F
00092 //#define mootProbEpsilon 1.19209290E-07F
00093 #endif
00094 */
00095 
00107 #define MOOT_PROB_NEG  -3E+38
00108 #define MOOT_PROB_ZERO -1E+38
00109 #define MOOT_PROB_ONE   0.0
00110 #define MOOT_PROB_NONE  1.0
00111 /*
00112 #ifdef FLT_MAX
00113 #  define MOOT_PROB_NEG  -FLT_MAX
00114 #  define MOOT_PROB_ZERO -1E+38
00115 #  define MOOT_PROB_ONE   0.0
00116 # else //-- !(DBL|FLT)_MAX
00117 #  define MOOT_PROB_NEG  -3E+38
00118 #  define MOOT_PROB_ZERO -1E+38
00119 #  define MOOT_PROB_ONE   0.0
00120 #endif //-- /(DBL|FLT)_MAX
00121 */
00122 
00123 moot_END_NAMESPACE
00124 
00125 #endif /* _moot_TYPES_H */

Generated on Mon Sep 11 16:10:33 2006 for libmoot by doxygen1.2.18