📄 treefeature.hpp
字号:
/* Context : Fuzzy Clustering Algorithms Author : Frank Hoeppner, see also AUTHORS file Description : header of class TreeFeature 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 TreeFeature_HEADER#define TreeFeature_HEADER/* configuration include */#ifdef HAVE_CONFIG_H/*//FILETREE_IFDEF HAVE_CONFIG_H*/#include "config.h"/*//FILETREE_ENDIF*/#endif// necessary includes#include "ddl.hpp"#include "ustream-s.hpp"#include <list>//#define INLINE inline// global types, constants, definitions#define KEYWORD_FEATURE "(datum"#define KEYWORD_FEATURE_VECTOR "(vector"#define KEYWORD_FEATURE_WEIGHT "(weight"#define DEFAULT_FEATURE_WEIGHT 1#define KEYWORD_FEATURE_RANGE "(range"#define DEFAULT_FEATURE_NORANGE 0#define KEYWORD_FEATURE_RESULT "(result"#define KEYWORD_FEATURE_LINE "(line"#define KEYWORD_FEATURE_HIERARCHY "(encloses"// class definitionclass TreeFeature { public: TreeFeature(); template <class PROT> void operator=(const PROT& a_prot) { datum().adjust(a_prot.center().rows(),a_prot.center().cols()); matrix_set(datum(),a_prot.center()); weight() = a_prot.total_pow_membxweight(); start().adjust(a_prot.start().rows(),a_prot.start().cols()); matrix_set(start(),a_prot.start()); delta().adjust(a_prot.delta().rows(),a_prot.delta().cols()); matrix_set(delta(),a_prot.delta()); } bool consistent(int&,int,int&) const; template <class ALGORITHM> void apply(ALGORITHM* ap_alg,int a_level, const TreeFeature* ap_prev=NULL,const TreeFeature* ap_father=NULL) const { (*ap_alg)(*this,a_level,ap_prev,ap_father); list< TreeFeature >::const_iterator i; const TreeFeature* p_prev(NULL); for (i=m_hierarchy.begin();i!=m_hierarchy.end();++i) { (*i).apply(ap_alg,a_level+1,p_prev,this); p_prev = &(*i); } } void self_include(bbox_type&,stat_type&) const; real_type select(const Selector&,const TreeFeature* p=NULL) const; void define(const Selector&,real_type); void read(istream&); void write(ostream&) const; inline const tuple_type& datum() const { return m_datum; } inline tuple_type& datum() { return m_datum; } inline real_type weight() const { return m_weight; } inline real_type& weight() { return m_weight; } inline real_type range() const { return m_range; } inline real_type& range() { return m_range; } inline tuple_type result() const { return m_result; } inline tuple_type& result() { return m_result; } inline const tuple_type& start() const { return m_start; } inline tuple_type& start() { return m_start; } inline const tuple_type& delta() const { return m_delta; } inline tuple_type& delta() { return m_delta; } inline const list< TreeFeature >& hierarchy() const { return m_hierarchy; } inline list< TreeFeature >& hierarchy() { return m_hierarchy; } inline const string& unrecognized() const { return m_unrecognized; } inline string& unrecognized() { return m_unrecognized; } protected: tuple_type m_datum; real_type m_weight; real_type m_range; tuple_type m_result; tuple_type m_start; tuple_type m_delta; list< TreeFeature > m_hierarchy; string m_unrecognized; private: };// class related functions and definitions/* inline implementation */inline ostream& operator<<(ostream& os,const TreeFeature& a_feature) { a_feature.write(os); return os; }inline istream& operator>>(istream& is,TreeFeature& a_feature) { a_feature.read(is); return is; }#endif // TreeFeature_HEADER
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -