⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 define.hpp

📁 模糊聚類分析源碼。包含教學文件
💻 HPP
字号:
/*    Context       : Basic Utility Files  Author        : Frank Hoeppner, see also AUTHORS file   Description   : header of function module define                  Source Documentation Handbook: tutorial-UTIL  History       : see source file  Comment       :     This file was generated automatically. DO NOT EDIT.  Copyright     : Copyright (C) 1999-2000 Frank Hoeppner    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*/#ifndef Define_HEADER#define Define_HEADER/* configuration include */#ifdef HAVE_CONFIG_H/*//FILETREE_IFDEF HAVE_CONFIG_H*/#include "config.h"/*//FILETREE_ENDIF*/#endif/* necessary includes */#include <limits.h>#include <float.h> // defines FLT_MAX#include <math.h>#include "defbool.hpp"//#define INLINE inline/* global types and constants */typedef double TData;typedef float TCost;typedef float TRange;typedef float TLambda;typedef unsigned int word;typedef char * const char_cp;typedef char const * char_cc; // const char * == char const *typedef const char * const char_cpc;#define SQRT2 (1.414213562373)#define SQRT3 (1.7320508076)#define SQRT5 (2.2360679775)#define ONE_NAUTICAL_MILE (1852.0)#define ONE_FEET (0.3048)#define GRAVITATIONAL_ACCELERATION (9.8066)#define UNIVERSAL_GAS_CONSTANT_AIR (287.04)#define ISENTROPIC_EXPANSION_AIR (1.4)/* data interface */#define POS_IMPOSSIBLE 1.0E20#define NEG_IMPOSSIBLE -1.0E20#define EPSILON 0.0001#define DEKA (10.0)#define HEKTO (100.0)#define KILO (1000.0)#define KILOBYTE (1024)#define MEGA (1.0E6)#define MEGABYTE (1048576)#define GIGA (1.0E9)#define TERA (1.0E12)#define DEZI (0.1)#define CENTI (0.01)#define MILLI (0.001)#define MICRO (1.0E-6)#define NANO (1.0E-9)#define PIKO (1.0E-12)#define FEMTO (1.0E-15)#define MIN_PER_HOUR (60)#define SEC_PER_MIN (60)#define FEET_TO_METRE (ONE_FEET)#define METRE_TO_FEET (1.0/FEET_TO_METRE)#define KTS_TO_MPS (ONE_NAUTICAL_MILE/(SEC_PER_MIN*MIN_PER_HOUR)) #define MPS_TO_KTS (1.0/KTS_TO_MPS) #define NM_TO_M (ONE_NAUTICAL_MILE)#define M_TO_NM (1.0/ONE_NAUTICAL_MILE)#define MIN_LAMBDA ((TLambda)0.0)#define MAX_LAMBDA ((TLambda)1.0)#define POS_IMPOSSIBLE_LAMBDA ((TLambda)2.0)#define NEG_IMPOSSIBLE_LAMBDA ((TLambda)-2.0)#define NO_CONFLICT_LAMBDA POS_IMPOSSIBLE_LAMBDA#define CONFLICT_LAMBDA ((TLambda)0.0)#define ZERO_COST (0.0)#define POS_IMPOSSIBLE_COST (1.0E20)#define NEG_IMPOSSIBLE_COST (-1.0E20)#define ZERO_RANGE (0.0)#define EPSILON_RANGE (0.001)#define POS_IMPOSSIBLE_RANGE (1.0E20)#define NEG_IMPOSSIBLE_RANGE (-1.0E20)#define BEEP_CHAR char(7)#define ESCAPE_ASCII 27#define BLANK_ASCII 32#define PLUS_ASCII 43#define COLON_ASCII 44#define MINUS_ASCII 45#define POINT_ASCII 46#define LOWER_A_ASCII 97#define LOWER_B_ASCII 98#define LOWER_C_ASCII 99#define LOWER_D_ASCII 100#define LOWER_E_ASCII 101#define LOWER_F_ASCII 102#define LOWER_G_ASCII 103#define LOWER_H_ASCII 104#define LOWER_I_ASCII 105#define LOWER_J_ASCII 106#define LOWER_K_ASCII 107#define LOWER_L_ASCII 108#define LOWER_M_ASCII 109#define LOWER_N_ASCII 110#define LOWER_O_ASCII 111#define LOWER_P_ASCII 112#define LOWER_Q_ASCII 113#define LOWER_R_ASCII 114#define LOWER_S_ASCII 115#define LOWER_T_ASCII 116#define LOWER_U_ASCII 117#define LOWER_V_ASCII 118#define LOWER_W_ASCII 119#define LOWER_X_ASCII 120#define LOWER_Y_ASCII 121#define LOWER_Z_ASCII 122template <class DATA>struct Constants  {  inline DATA max() const;  inline DATA min() const;  };#define STATE_ClosedNode (1)#define STATE_ExpandedNode (2)#define STATE_Duplicate (4)#define STATE_Upgraded (8)#define STATE_Downgraded (16)#define ACTION_SuccToBeDeleted (32)#define ACTION_ToBeDeleted (64)#define ACTION_ToBeExpanded (128)#define ACTION_ToBeOpened (256)#define ACTION_ToBeClosed (512)#define MAX_LEN_TAG_STRING 15#define MAX_LEN_NAME_STRING 31//#define MAX_LEN_BUFFER_STRING 127#define REDRAW_STARTFINAL ((int)1)#define REDRAW_CONSTRAINTS ((int)2)#define REDRAW_STATE ((int)4)#define REDRAW_SELECTION ((int)8)#define REDRAW_TIME_DEPENDENT ((int)16)extern const float COLOR_ID_CONFLICTOUS[];extern const float COLOR_ID_UNVALIDATED[];extern const float COLOR_ID_NOCONFLICTYET[];extern const float COLOR_ID_FINALCONFIG[];extern const float COLOR_ID_STARTCONFIG[];extern const float COLOR_ID_SELECTED[];extern const float COLOR_ID_CONSTRAINT[];extern const float COLOR_ID_MOVING[];/* Constants interface */#define SQR(a)      ((a)*(a))#define ZERO(a)     (fabs(a)<EPSILON)#define NOTZERO(a)  (fabs(a)>=EPSILON)#define POSITIVE(a) ((a) >  EPSILON)#define NEGATIVE(a) ((a) < -EPSILON)#define EQUAL ==#define NOT(expr) (!(expr))#define SET_BIT(i) (1<<i)#define IS_MASKED(status,mask,tag) ( ((status) & (mask)) == tag )#define IS_TAG(status,tag) ( ((status) & (tag)) != 0 )#define IS_NO_TAG(status,tag) ( ((status) & (tag)) == 0 )#define SET_TAG(status,tag) (status) |= (tag)#define CLEAR_TAG(status,tag) (status) &= (~(tag))TEMPLATE_SPECIALIZATION inline int Constants<int>::max() const { return INT_MAX; }TEMPLATE_SPECIALIZATION inline int Constants<int>::min() const { return INT_MIN; }TEMPLATE_SPECIALIZATION inline float Constants<float>::max() const { return FLT_MAX; }TEMPLATE_SPECIALIZATION inline float Constants<float>::min() const { return FLT_MIN; }TEMPLATE_SPECIALIZATION inline double Constants<double>::max() const { return DBL_MAX; }TEMPLATE_SPECIALIZATION inline double Constants<double>::min() const { return DBL_MIN; }/* inline implementation */#endif /* Define_HEADER */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -