📄 conf.h
字号:
/* Ant-based Clustering Copyright (C) 2004 Julia Handl Email: Julia.Handl@gmx.de This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA*//***************************************************date: 7.4.2003author: Julia Handl (julia.Handl@gmx.de)description: - wrapper class for all parameter settings***************************************************/#ifndef CONF_JH_2003#define CONF_JH_2003#include <iostream.h>#include <fstream.h> #define USED_DATA_TYPE float#define FALSE 0#define TRUE 1/* define the distance measure to be used */#define EUCLIDEAN/* define the types of artificial test data */#define A1 1#define A2 2#define A3 3#define A4 4#define TEST 0class conf { public: /* Experimental setup */ const static int evalnbr = 1; int evalctr; const static int clustering = TRUE; const static int newprob = TRUE; const static int increase = TRUE; const static int weighting = FALSE; const static int adaptalpha = TRUE; const static int lookahead = TRUE; const static int initradius = 1; /* Parameters used by ACCL */ // ant parameters int clusterphase; const static int colonysize = 10; int maxspeed; const static int memorysize = 10; double alpha; double alphasigma; const static double kd = 0.3; const static double kp = 0.3; int generations; const static int generation_length = 40000; int radius; const static int maxfailure = 100; // grid parameters int imax; int jmax; // databin parameters int bintype; int binsize; int bindim; USED_DATA_TYPE mu; USED_DATA_TYPE max; int type; int num_cluster; USED_DATA_TYPE ** mu_cluster; USED_DATA_TYPE ** sigma_cluster; int * size_cluster; /* Parameters for other algorithms .... */ /* Kmeans */ /* Number of intended clusters */ int kclusters; /* SOM (Kohonen Networks) */ int imax_som; int jmax_som; double lr0_som; double ns0_som; double ns1_som; int gen_som; /* MDS */ const static double lr = 0.05; const static int T_MDS = 10; conf(int type) { if (adaptalpha == FALSE) { alpha = 0.5; } #ifdef COSINE cout << "Using Cosine similarity" << endl;#endif#ifdef EUCLIDEAN cout << "Using Euclidean distance" << endl;#endif#ifdef CORRELATION cout << "Using Correlation-based similarity" << endl;#endif }};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -