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

📄 flatfeature.hpp

📁 模糊聚類分析源碼。包含教學文件
💻 HPP
字号:
/*    Context       : Fuzzy Clustering Algorithms  Author        : Frank Hoeppner, see also AUTHORS file   Description   : header of class FlatFeature                    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 FlatFeature_HEADER#define FlatFeature_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 "Analysis.hpp"//#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 definitiontemplate <class FEATURE>class FlatFeature    {    public:        FlatFeature(FEATURE *ap_feature                , const tree_analysis_type *ap_analysis                , const tree_analysis_type::link_iter& ai_link);    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 FlatFeature* ap_prev=NULL,const FlatFeature* ap_father=NULL) const      {         (*ap_alg)(*this,a_level,ap_prev,ap_father);             }    void self_include(bbox_type&,stat_type&) const;    real_type select(const Selector&,const FlatFeature* p=NULL) const;    void define(const Selector&,real_type);    void read(istream&);    void write(ostream&) const;    inline const tuple_type& datum() const { return mp_feature->datum(); }    inline tuple_type& datum() { return mp_feature->datum(); }    void recalc_weight_factor(const Selector& a_selector)       { m_weight_factor = mp_analysis->select(a_selector,*mp_feature,0,0,0,mi_link); }    inline real_type weight() const { return mp_feature->weight()*m_weight_factor; }    inline tuple_type result() const { return mp_feature->result(); }    inline tuple_type& result() { return mp_feature->result(); }    inline const tuple_type& start() const { return mp_feature->start(); }    inline tuple_type& start() { return mp_feature->start(); }    inline const tuple_type& delta() const { return mp_feature->delta(); }    inline tuple_type& delta() { return mp_feature->delta(); }    inline const string& unrecognized() const { return mp_feature->unrecognized(); }    inline string& unrecognized() { return mp_feature->unrecognized(); }      protected:              private:            FEATURE *mp_feature;    const tree_analysis_type *mp_analysis;    const tree_analysis_type::link_iter mi_link;    real_type m_weight_factor;      };// class related functions and definitions/* inline implementation */template <class FEATURE>inline ostream& operator<<(ostream& os,const FlatFeature<FEATURE>& a_feature)  { a_feature.write(os); return os; }template <class FEATURE>inline istream& operator>>(istream& is,FlatFeature<FEATURE>& a_feature)  { a_feature.read(is); return is; }#endif // FlatFeature_HEADER

⌨️ 快捷键说明

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