defs.h

00001 #ifndef Defs_H
00002 #define Defs_H
00003 
00004 #pragma warning(disable: 4786)
00005 
00006 #include <list>
00007 #include <string>
00008 #include <vector>
00009 #include <algorithm>
00010 
00011 #define Value_Type float
00012 
00013 #define NR_END 1
00014 #define FREE_ARG char*
00015 #define TMatrix Value_Type**
00016 #define TVector Value_Type*
00017 #define TIntVector int*
00018 #define STANDARD 1
00019 #define BATCH 2
00020 #define ONLINE 3
00021 #define DTHREE 1
00022 #define DTWO 2
00023 #define MaxDimension 64
00024 #define RANDOMIZED 1
00025 #define LINEAR 2
00026 #define WINDOW 3
00027 #define GAUSSIAN 1
00028 #define BUBBLE 2
00029 #define CUTGAUSS 3
00030 #define EP 4
00031 #define HEXA 1
00032 #define RECT 2
00033 #define TORO 0 
00034 #define HEXA_STR "hexa"
00035 #define RECT_STR "rect"
00036 #define TORO_STR "toro"
00037 #define GAUSSIAN_STR "gaussian"
00038 #define BUBBLE_STR "bubble"
00039 #define CUTGAUSS_STR "cutgauss"
00040 #define EP_STR "ep"
00041 #define UNKNOWN "unknown"
00042 #define Default_LearningType "Batch"
00043 #define Default_DimensionType "Two"
00044 #define MIN_VALUE        1
00045 #define MAX_VALUE        2
00046 #define MEDIAN_VALUE 3
00047 #define MEAN_VALUE       4
00048 #define PIXEL   4
00049 
00050 
00051 
00052 using std::string;
00053 using std::vector;
00054 using std::list;
00055 
00056 
00057 
00058 typedef vector<Value_Type> TVecValue;
00059 
00060 typedef list< string > Tstrlist;
00061 //typedef vector< list< string > > Tlabel;
00062 
00063 class BMUnode {
00064 public:
00065         int i;
00066         Value_Type dist;
00067         BMUnode() : i(0), dist(0) {}
00068         BMUnode( int index, Value_Type dist_value ) : i( index ), dist( dist_value) {}
00069 };
00070 
00071 bool operator<(const BMUnode& x, const BMUnode& y)
00072 {
00073     return (x.dist < y.dist);
00074 }
00075 
00076 typedef vector<BMUnode> TVecBMU;
00077 typedef vector< vector<BMUnode> > TBMU;
00078 
00079 typedef vector< string > TvecLabel;
00080 typedef vector< vector< string > > TLabel;
00081 
00082 typedef vector< vector<int> >  SList;
00083 
00084 class mean_node { 
00085 public:
00086         mean_node( TVector mean, int num) : mean(mean), num(num) {};
00087         TVector mean;
00088         int num;
00089 };
00090 
00091 typedef vector<float> VecInt;
00092 typedef vector< VecInt > MatrixInt;
00093 
00094 typedef vector< mean_node > TvecMean;
00095 
00096 typedef vector< vector< int > >  TCluster;
00097 typedef vector< int >   TVecCluster;
00098 
00099 #endif

Generated on Tue Aug 7 16:03:33 2007 for SOMCode by  doxygen 1.5.3