📄 option.hpp
字号:
/* Context : Fuzzy Clustering Algorithms Author : Frank Hoeppner, see also AUTHORS file Description : header of class Option 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*//* The University of Applied Sciences Oldenburg/Ostfriesland/Wilhelmshaven hereby disclaims all copyright interests in the program package `fc' (tool package for fuzzy cluster analysis) written by Frank Hoeppner. Prof. Haass, President of Vice, 2000-Mar-10*/#ifndef Option_HEADER#define Option_HEADER/* configuration include */#ifdef HAVE_CONFIG_H/*//FILETREE_IFDEF HAVE_CONFIG_H*/#include "config.h"/*//FILETREE_ENDIF*/#endif// necessary includes#include "ddl.hpp"#include <string>//#define INLINE inline// global types, constants, definitions#define KEYWORD_OPTION_ANALYSISNAME "(name"#define DEFAULT_OPTION_ANALYSISNAME "noname"#define CL_OPTION_ANALYSISNAME 'n'#define KEYWORD_OPTION_HISTORY "(history"#define KEYWORD_OPTION_DATADIM "(data-dimension"#define DEFAULT_OPTION_NODATADIM -1#define KEYWORD_OPTION_PROTCOUNT "(prot-count"#define KEYWORD_OPTION_DATACOUNT "(data-count"#define DEFAULT_OPTION_PROTCOUNT -1#define DEFAULT_OPTION_DATACOUNT -1#define KEYWORD_OPTION_VALIDITY "(validity"#define DEFAULT_OPTION_VALIDITY 0#define KEYWORD_OPTIONS "(settings"#define DEFAULT_OPTION_CLUSTERRANGE -1#define KEYWORD_OPTION_CLUSTERRANGE "(cluster-range"#define CL_OPTION_CLUSTERRANGE 'r'#define DEFAULT_OPTION_CONSTANTS -1#define KEYWORD_OPTION_CONSTANTS "(parameter"#define CL_OPTION_CONSTANTS 'c'#define KEYWORD_OPTION_DISTSHIFT "(distance-shift"#define DEFAULT_OPTION_DISTSHIFT 0#define CL_OPTION_DISTSHIFT 'a'#define KEYWORD_OPTION_FUZZIFIER "(fuzzifier"#define DEFAULT_OPTION_FUZZIFIER 2#define CL_OPTION_FUZZIFIER 'f'#define KEYWORD_OPTION_POSTSCRIPT "(postscript"#define DEFAULT_OPTION_POSTSCRIPT false#define CL_OPTION_POSTSCRIPT 'p'#define KEYWORD_OPTION_GRAPHMODE "(graph-mode"#define DEFAULT_OPTION_GRAPHMODE 2#define CL_OPTION_GRAPHMODE 'g'#define KEYWORD_OPTION_INIT "(init"#define FC_INIT_MEMB 0#define FC_INIT_PROT 1#define FC_INIT_AUTO 2#define DEFAULT_OPTION_INIT FC_INIT_PROTextern keyword_entry g_keyword_init[];#define CL_OPTION_INIT 'i'#define KEYWORD_OPTION_INTERDATADIST "(inter-data-dist"#define DEFAULT_OPTION_INTERDATADIST -1#define CL_OPTION_INTERDATADIST 'd'#define KEYWORD_OPTION_INTERIMOUT "(interim-output"#define DEFAULT_OPTION_NOINTERIMOUT -1#define CL_OPTION_INTERIMOUT 's'#define KEYWORD_OPTION_MAXFEATURES "(max-features"#define DEFAULT_OPTION_MAXFEATURES 1000#define CL_OPTION_MAXFEATURES 'x'#define KEYWORD_OPTION_OUTPUT "(output"#define FC_OUTPUT_QUIET 0#define FC_OUTPUT_OPTION 1#define FC_OUTPUT_DATA 2#define FC_OUTPUT_CLUSTER 4#define FC_OUTPUT_LINKAGE 8#define FC_OUTPUT_ALL_BUT_LINKS (FC_OUTPUT_OPTION|FC_OUTPUT_DATA|FC_OUTPUT_CLUSTER)#define FC_OUTPUT_ALL (FC_OUTPUT_ALL_BUT_LINKS|FC_OUTPUT_LINKAGE)#define DEFAULT_OPTION_OUTPUT FC_OUTPUT_ALL_BUT_LINKSextern keyword_entry g_keyword_output[];#define CL_OPTION_OUTPUT 'o'#define CL_OPTION_QUIETMODE 'q'#define KEYWORD_OPTION_PICK "(pick"#define DEFAULT_OPTION_PICK 0#define CL_OPTION_PICKSELECT 'k'#define AXIS_BEGIN 0#define AXIS_X 0#define AXIS_Y 1#define AXIS_Z 2#define AXIS_T 3 // time#define AXIS_C 4 // color (hue)#define AXIS_A 5 // saturation#define AXIS_I 6 // intensity (value)#define AXIS_S 7 // size (symbol)#define AXIS_DX 8 #define AXIS_DY 9#define AXIS_DZ 10#define AXIS_END 11extern const char KEYWORD_OPTION_SELECTAXIS[AXIS_END][16];extern const Selector DEFAULT_OPTION_SELECTAXIS[AXIS_END];#define CL_OPTION_SELECTXAXIS 'X'#define CL_OPTION_SELECTYAXIS 'Y'#define CL_OPTION_SELECTZAXIS 'Z'#define CL_OPTION_SELECTTAXIS 'T'#define CL_OPTION_SELECTCAXIS 'C'#define CL_OPTION_SELECTAAXIS 'A'#define CL_OPTION_SELECTIAXIS 'I'#define CL_OPTION_SELECTSAXIS 'S'#define CL_OPTION_SELECTDXAXIS 'U'#define CL_OPTION_SELECTDYAXIS 'V'#define CL_OPTION_SELECTDZAXIS 'W'#define KEYWORD_OPTION_SUBSTFEATURES "(subst-features"#define DEFAULT_OPTION_SUBSTFEATURES false#define CL_OPTION_SUBSTFEATURES 'u'#define KEYWORD_OPTION_MAXITER "(max-iteration"#define DEFAULT_OPTION_MAXITER 1000#define CL_OPTION_MAXITERATIONS 'm'#define KEYWORD_OPTION_THRESHOLD "(threshold"#define DEFAULT_OPTION_THRESHOLD 1E-3#define CL_OPTION_CONVERGENCE 'e'#define KEYWORD_OPTION_UNSUPERVISED "(unsupervised"#define DEFAULT_OPTION_UNSUPERVISED false#define CL_OPTION_UNSUPERVISED 'v'#define KEYWORD_OPTION_WEIGHTFACTOR "(weight-factor"extern const Selector DEFAULT_OPTION_WEIGHTFACTOR;#define CL_OPTION_WEIGHTFACTOR 'w'#define KEYWORD_OPTION_DATATRANS "(data-trans"#define KEYWORD_OPTION_RESTRANS "(result-trans"#define CL_OPTION_DATATRANS 't'#define CL_OPTION_RESTRANS 'R'#define KEYWORD_OPTION_DATASCALE "(scale"#define DEFAULT_OPTION_DATASCALE 0#define CL_OPTION_DATASCALE 'D'#define KEYWORD_OPTION_BBOX_LOCAL "(bbox-local"#define KEYWORD_OPTION_BBOX_GLOBAL "(bbox-global"#define KEYWORD_OPTION_PREFER_LOCAL "(prefer-local"#define DEFAULT_OPTION_PREFER_LOCAL false#define CL_OPTION_PREFER_LOCAL 'l'#define KEYWORD_OPTION_STAT_LOCAL "(stat-local"#define KEYWORD_OPTION_STAT_GLOBAL "(stat-global"#define KEYWORD_OPTION_SPHEREHIER "(sphere-hierarchy"#define BUSH_STARTRANGE_AXIS 0#define BUSH_ENDRANGE_AXIS 1#define BUSH_RANGEDIV_AXIS 2#define CL_OPTION_SPHEREHIER 'H'#define KEYWORD_OPTION_CONNECT "(connect"#define FC_CONNECT_FLAT 1#define FC_CONNECT_HIER 2#define FC_CONNECT_LINE 3#define FC_CONNECT_SEQC 4#define DEFAULT_OPTION_CONNECT FC_CONNECT_LINEextern keyword_entry g_keyword_connect[];#define CL_OPTION_CONNECT 'L'#define KEYWORD_OPTION_COMPARENAME "(compare"#define DEFAULT_OPTION_COMPARENAME ""#define CL_OPTION_COMPARENAME 'N'#define KEYWORD_OPTION_PROTDEPTH "(prot-depth"#define KEYWORD_OPTION_DATADEPTH "(data-depth"#define FC_DEPTH_FLAT 0#define FC_DEPTH_SET 1#define FC_DEPTH_ANY -1#define DEFAULT_OPTION_PROTDEPTH FC_DEPTH_ANY#define DEFAULT_OPTION_DATADEPTH FC_DEPTH_ANY#define KEYWORD_OPTION_COMSEP "(separation"#define DEFAULT_OPTION_COMSEP -1#define KEYWORD_OPTION_PARTCOEFF "(part-coeff"#define DEFAULT_OPTION_PARTCOEFF -1#define KEYWORD_OPTION_HYPERVOL "(hypervolume"#define DEFAULT_OPTION_HYPERVOL -1#define KEYWORD_OPTION_CONTRACTIVE "(contractive"#define DEFAULT_OPTION_CONTRACTIVE -1// class definitionclass Option { public: Option(); void read(istream&); void write(ostream&) const; inline const string& analysis_name() const { return m_analysis_name; } inline string& analysis_name() { return m_analysis_name; } inline const string& history() const { return m_history; } inline string& history() { return m_history; } inline int data_dimension() const { return m_data_dimension; } inline int& data_dimension() { return m_data_dimension; } inline int number_prototypes() const { return m_number_prototypes; } inline int& number_prototypes() { return m_number_prototypes; } inline int number_features() const { return m_number_features; } inline int& number_features() { return m_number_features; } inline real_type validity_measure() const { return m_generic_validity_measure; } inline real_type& validity_measure() { return m_generic_validity_measure; } inline int min_no_of_clusters() const { return m_min_no_of_clusters; } inline int& min_no_of_clusters() { return m_min_no_of_clusters; } inline int max_no_of_clusters() const { return m_max_no_of_clusters; } inline int& max_no_of_clusters() { return m_max_no_of_clusters; } inline real_type distance_shift() const { return m_distance_shift; } inline real_type& distance_shift() { return m_distance_shift; } inline real_type fuzzifier() const { return m_fuzzifier; } inline real_type& fuzzifier() { return m_fuzzifier; } inline bool postscript() const { return m_postscript; } inline bool& postscript() { return m_postscript; } inline int graph_mode() const { return m_graph_mode; } inline int& graph_mode() { return m_graph_mode; } inline int init() const { return m_init_strategy; } inline int& init() { return m_init_strategy; } inline real_type inter_data_distance() const { return m_inter_data_distance; } inline real_type& inter_data_distance() { return m_inter_data_distance; } inline int interim_output() const { return m_interim_output; } inline int& interim_output() { return m_interim_output; } inline int maximum_features() const { return m_maximum_features; } inline int& maximum_features() { return m_maximum_features; } inline int output() const { return m_output; } inline int& output() { return m_output; } inline int pick_no() const { return m_pick_no; } inline int& pick_no() { return m_pick_no; } inline bool substitute_features() const { return m_substitute_features; } inline bool& substitute_features() { return m_substitute_features; } inline index_type max_iterations() const { return m_max_iterations; } inline index_type& max_iterations() { return m_max_iterations; } inline real_type threshold() const { return m_threshold; } inline real_type& threshold() { return m_threshold; } inline real_type change() const { return m_change; } inline real_type& change() { return m_change; } inline bool unsupervised() const { return m_unsupervised; } inline bool& unsupervised() { return m_unsupervised; } inline const Selector& weight_factor() const { return m_weight_factor; } inline Selector& weight_factor() { return m_weight_factor; } inline const int_matrix_type& data_transform() const { return m_data_transform; } inline int_matrix_type& data_transform() { return m_data_transform; } inline const int_matrix_type& res_transform() const { return m_result_transform; } inline int_matrix_type& res_transform() { return m_result_transform; } inline int data_scale() const { return m_data_scale; } inline int& data_scale() { return m_data_scale; } inline const bbox_type& bbox_local() const { return m_bbox_local; } inline bbox_type& bbox_local() { return m_bbox_local; } inline const bbox_type& bbox_global() const { return m_bbox_global; } inline bbox_type& bbox_global() { return m_bbox_global; } inline const bbox_type& bbox() const { return (m_prefer_local || (m_bbox_global.rows()==0)) ? m_bbox_local : m_bbox_global; } inline bool prefer_local() const { return m_prefer_local; } inline bool& prefer_local() { return m_prefer_local; } inline const stat_type& stat_local() const { return m_stat_local; } inline stat_type& stat_local() { return m_stat_local; } inline const stat_type& stat_global() const { return m_stat_global; } inline stat_type& stat_global() { return m_stat_global; } inline const stat_type& stat() const { return (m_prefer_local || (m_stat_global.rows()==0)) ? m_stat_local : m_stat_global; } inline const tuple_type& sphere_hierarchy_param() const { return m_sphere_hierarchy; } inline tuple_type& sphere_hierarchy_param() { return m_sphere_hierarchy; } inline int connect() const { return m_connect; } inline int& connect() { return m_connect; } inline const string& compare_name() const { return m_compare_name; } inline string& compare_name() { return m_compare_name; } inline int data_depth() const { return m_data_depth; } inline int& data_depth() { return m_data_depth; } inline int prot_depth() const { return m_prot_depth; } inline int& prot_depth() { return m_prot_depth; } inline real_type separation() const { return m_separation; } inline real_type& separation() { return m_separation; } inline real_type partition_coefficient() const { return m_part_coeff; } inline real_type& partition_coefficient() { return m_part_coeff; } inline real_type hypervolume() const { return m_hyper_volume; } inline real_type& hypervolume() { return m_hyper_volume; } inline real_type contractive() const { return m_contractive; } inline real_type& contractive() { return m_contractive; } #define OPTIONS_MAX_CONSTANTS 10 TData m_constants[OPTIONS_MAX_CONSTANTS]; Selector m_selector[AXIS_END]; protected: private: string m_unrecognized; string m_analysis_name; string m_history; int m_data_dimension; int m_number_prototypes; int m_number_features; real_type m_generic_validity_measure; int m_min_no_of_clusters; int m_max_no_of_clusters; real_type m_distance_shift; real_type m_fuzzifier; bool m_postscript; int m_graph_mode; int m_init_strategy; real_type m_inter_data_distance; int m_interim_output; int m_maximum_features; int m_output; int m_pick_no; bool m_substitute_features; index_type m_max_iterations; real_type m_threshold; real_type m_change; bool m_unsupervised; Selector m_weight_factor; int_matrix_type m_data_transform; int_matrix_type m_result_transform; int m_data_scale; bbox_type m_bbox_local; bbox_type m_bbox_global; bool m_prefer_local; stat_type m_stat_local; stat_type m_stat_global; tuple_type m_sphere_hierarchy; int m_connect; string m_compare_name; int m_data_depth; int m_prot_depth; real_type m_separation; real_type m_part_coeff; real_type m_hyper_volume; real_type m_contractive; };// class related functions and definitions/* inline implementation */inline ostream& operator<<(ostream& os,const Option& opt) { opt.write(os); return os; }inline istream& operator>>(istream& is,Option& opt) { opt.read(is); return is; }#endif // Option_HEADER
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -